<%- local fw = require "luci.model.firewall".init() local izl = { } local ezl = { } local _, z for _, z in ipairs(fw:get_zones()) do if z:name() ~= "wan" then izl[#izl+1] = z end if z:name() ~= "lan" then ezl[#ezl+1] = z end end local keys, vals = { }, { } luci.sys.net.ipv4_hints(function(ip, name) keys[#keys+1] = ip vals[#vals+1] = '%s (%s)' %{ ip, name } end) -%>

<%:New port forward%>

<%:Name%>
<%:Protocol%>
<%:External zone%>
<%:External port%>
<%:Internal zone%>
<%:Internal IP address%>
<%:Internal port%>
0, "data-choices", {keys, vals}) %>/>