o = s:taboption('general', ListValue, "local_default",
translate("Local-out default"),
- translate("Default action for locally generated packets"))
+ translate("Default action for locally generated TCP packets"))
ss.values_actions(o)
+o = s:taboption('general', DynamicList, "ifnames",
+ translate("Ingress interfaces"),
+ translate("Only apply rules on packets from these network interfaces"))
+ss.values_ifnames(o)
s:taboption('general', Value, "ipt_args",
translate("Extra arguments"),
translate("Passes additional arguments to iptables. Use with care!"))
translate("Dst ip forward file"),
translate("File containing ip addresses for the purposes as with <em>Dst ip forward</em>"))
o.datatype = "file"
+o = s:taboption('dstip', ListValue, "dst_default",
+ translate("Dst default"),
+ translate("Default action for packets whose destination addresses do not match any of the destination ip list"))
+ss.values_actions(o)
return m
end)
function values_actions(o)
- for _, a in ipairs(actions) do
- o:value(a)
+ o:value("bypass")
+ o:value("forward")
+ if o.option ~= "dst_default" then
+ o:value("checkdst")
end
end
end
function values_ipaddr(o)
- local keys, vals = {}, {}
for _, v in ipairs(nw:get_interfaces()) do
for _, a in ipairs(v:ipaddrs()) do
o:value(a:host():string(), '%s (%s)' %{ a:host(), v:shortname() })
end
end
+function values_ifnames(o)
+ for _, v in ipairs(nw:get_interfaces()) do
+ if v.dev then
+ o:value(v.dev.name)
+ end
+ end
+end
+
function options_client(s, tab)
local o
"udp_only",
}
-actions = {
- "bypass",
- "forward",
- "checkdst",
-}
-
methods = {
-- aead
"aes-128-gcm",