= 32) then statusCode = "Can't add configuration to this table. Maximum limit reached." errorFlag = "ERROR" NextPage = "port_forwarding" else errorFlag, statusCode = sslvpn.portForwardConfig (inputTable, RowId, "add") end end else errorFlag, statusCode = sslvpn.portForwardConfig (inputTable, RowId, "edit") end -- save db if no error if (errorFlag == "OK") then db.save() end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) or statusCode end web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "hostconfig") then local inputTable = web.cgiToLuaTable(cgi) local hostTbl = {} hostTbl["SSLVPNPortForwardingFQDNMap.ServerIP"] = util.joinFields(inputTable,"SSLVPNPortForwardingFQDNMap","ServerIP", ".",4) --automation part begin errorFlag = "OK" validationTable = { function() return validations.ipAddressValidateEL(hostTbl["SSLVPNPortForwardingFQDNMap.ServerIP"],"","IP Address error") end } for k,v in pairs (validationTable) do validationFunc= validationTable[k] errorFlag, statusCode,field,skipValidations = validationFunc() if(errorFlag==1 or errorFlag == "ERROR") then statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) or statusCode statusMessage = field .. ": " .. statusMessage break end end --automation part end hostTbl["SSLVPNPortForwardingFQDNMap.FQDNName"] = inputTable["SSLVPNPortForwardingFQDNMap.FQDNName"] if( errorFlag == "OK" or errorFlag ==0 ) then -- for add if (RowId == "-1") then if (cgi["hdHostCount"] ~= nil) then local hdCount = cgi["hdHostCount"] if (tonumber(hdCount) >= 32) then statusCode = "Can't add configuration to this table. Maximum limit reached." errorFlag = "ERROR" NextPage = "port_forwarding" else errorFlag, statusCode = sslvpn.portForwardConfig (hostTbl, RowId, "add") end end else errorFlag, statusCode = sslvpn.portForwardConfig (hostTbl, RowId, "edit") end -- save db if no error if (errorFlag == "OK") then db.save() end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) or statusCode end web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "deleteapp") then local rowTbl = {} rowTbl[1] = RowId errorFlag, statusCode = sslvpn.portForwardConfig (rowTbl, "-1","delete") -- save db if no error if (errorFlag == "OK") then db.save() end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "deletehost") then local rowTbl = {} rowTbl[1] = RowId errorFlag, statusCode = sslvpn.portForwardConfig (rowTbl, "-1","delete") -- save db if no error if (errorFlag == "OK") then db.save() end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) web.goToPage(NextPage, true, true) else local remoteMgmtStatus = db.getAttribute ("accessMgmt", "accessMgmt._ROWID_", "0", "accessMgmtEnable") ?> $|COMPANY_NAME|$ $|PRODUCT_FAMILY|$ - Port Forwarding
 
Port Forwarding
 
IPv6
IPv4
 
 
$| statusMessage |$
List of Configured Applications for Port Forwarding
  Local Server IP Address TCP Port Number Action
$| row["SSLVPNPortForwardingAppsMap.ServerIP"] or ''|$ $| row["SSLVPNPortForwardingAppsMap.Port"] or ''|$
 
Add New Application for Port Forwarding:
Local Server IP Address TCP Port Number Add
.
.
.
 
List of Configured Host Names for Port Forwarding
64) then fqdnName = row["SSLVPNPortForwardingFQDNMap.FQDNName"] row["SSLVPNPortForwardingFQDNMap.FQDNName"] = string.sub(row["SSLVPNPortForwardingFQDNMap.FQDNName"], 1, 64) .. "..." end ?>
  Local Server IP Address Fully Qualified Domain Name Action
$| row["SSLVPNPortForwardingFQDNMap.ServerIP"] or ''|$ $| row["SSLVPNPortForwardingFQDNMap.FQDNName"] |$
 
Add New Host Name for Port Forwarding:
Local Server IP Address Fully Qualified Domain Name Add
.
.
.