WAN Mode Page to configure this page." end local maxLimitVal = db.getAttribute ("environment", "name", "IP/MAC_BINDINGS", "value") or '400' if (ButtonType and ButtonType == "add") then local inputTable = web.cgiToLuaTable(cgi) --automation part begin local tableIndex = 1 local errorFlag = "OK" validationTable = { function() return validations.checkStringLength(1,32,inputTable["IPMACBinding.Name"],"Name Error") end, --function() return validations.ipAddressValidate(inputTable["IPMACBinding.IPAddress"],"","IP Address Error") end, function() return validations.macAddressValidate(inputTable["IPMACBinding.SourceMACAddress"],"MAC Address Error") end } while (tableIndex <= #(validationTable)) do validationFunc = validationTable[tableIndex] 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 if(skipValidations ~= "") then tableIndex = tableIndex + skipValidations + 1 else tableIndex = tableIndex + 1 end end if( errorFlag == "OK" or errorFlag == 0 ) then -- for add if(RowId == "-1") then if(cgi["hdCount"] ~= nil) then local hdCount = cgi["hdCount"] if(tonumber(hdCount) >= tonumber (maxLimitVal)) then statusCode = "Can't add configuration to this table. Maximum limit reached." errorFlag = "ERROR" NextPage = "ip_mac_binding_IPv6" else inputTable["IPMACBinding.ipVersion"] = "10" errorFlag, statusCode = fwView.ipMacConfig(inputTable, RowId, "add") end end 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 == "edit") then configRowId = RowId web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "delete") then local field, splitted, rows = web.cgiSearch(cgi, "IPMACBinding1") -- if any rows to delete if (rows) then errorFlag, statusCode = fwView.deleteIpMac(rows) end -- 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 == "config") then local inTable = web.cgiToLuaTable(cgi) local inputTable = {} inputTable["IPMACEmailLogsConfig.IPMACVoilationEmailLogsSet"] = inTable["IPMACEmailLogsConfig.IPMACVoilationEmailLogsSet"] configRow = db.getRow("MACFiltering","_ROWID_", "1") if(configRow== nil) then errorFlag, statusCode = fwView.ipMacConfig(inputTable, "-1", "add") else errorFlag, statusCode = fwView.ipMacConfig(inputTable, "2", "edit") end -- 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 -- for error if (errorFlag ~= "OK") then configRow = web.cgiToLuaTable(cgi) configRow = db.getRow("IPMACEmailLogsConfig","_ROWID_", "2") if(configRow == nil) then local outTable = {} outTable["IPMACEmailLogsConfig.IPMACVoilationEmailLogsSet"] = "0" configRow = outTable end -- for edit else configRow = db.getRow("IPMACEmailLogsConfig","_ROWID_", "2") if(configRow == nil) then local outTable = {} outTable["IPMACEmailLogsConfig.IPMACVoilationEmailLogsSet"] = "0" configRow = outTable end end ?> $|COMPANY_NAME|$ $|PRODUCT_FAMILY|$ - IP/MAC Binding (IPv6)
 
IP/MAC Binding
 
IPv6
IPv4
 
 
$| statusMessage|$
Email IP/MAC Violations
Do you want to enable E-mail Logs for IP/MAC Binding Violation?
Yes
No
* For this option e-mailing of logs must be enabled in Firewall Logs & E-mail page
 
 
IP/MAC Bindings
  Name MAC Address IP Address Log Dropped Packets Action
$| row["IPMACBinding.Name"] |$ $| row["IPMACBinding.SourceMACAddress"] |$ $| row["IPMACBinding.IPAddress"] |$ $| str |$
Add IP/MAC Binding Rule:
Name MAC Address IP Address Log Dropped Packets Add