% local fw = require "luci.model.firewall".init() local nw = require "luci.model.network".init() local wz = fw:get_zone("wan") local lz = fw:get_zone("lan") local keys, vals, a, k, v = {}, {} for k, v in ipairs(nw:get_interfaces()) do for k, a in ipairs(v:ipaddrs()) do keys[#keys+1] = a:host():string() vals[#vals+1] = '%s (%s)' %{ a:host(), v:shortname() } end end %>
<%:New source NAT%>: | |||||
---|---|---|---|---|---|
<%:Name%> | <%:Source zone%> | <%:Destination zone%> | <%:To source IP%> | <%:To source port%> | |
0, "data-choices", { keys, vals }) %> /> |