luci/applications/luci-fw/luasrc/model/cbi/luci_fw/portfw.lua
2008-06-05 19:16:38 +00:00

29 lines
905 B
Lua

-- ToDo: Translate, Add descriptions and help texts
require("luci.sys")
m = Map("luci_fw", "Portweiterleitung", [[Portweiterleitungen ermöglichen es interne
Netzwerkdienste von einem anderen externen Netzwerk aus erreichbar zu machen.]])
s = m:section(TypedSection, "portfw")
s.template = "cbi/tblsection"
s.addremove = true
s.anonymous = true
iface = s:option(ListValue, "iface", "Schnittstelle", "Externe Schnittstelle")
iface.default = "wan"
luci.model.uci.foreach("network", "interface",
function (section)
if section[".name"] ~= "loopback" then
iface:value(section[".name"])
end
end)
proto = s:option(ListValue, "proto", "Protokoll")
proto:value("tcp", "TCP")
proto:value("udp", "UDP")
proto:value("tcpudp", "TCP + UDP")
dport = s:option(Value, "dport", "Externer Port", "Port[:Endport]")
to = s:option(Value, "to", "Interne Adresse", "IP-Adresse[:Zielport[-Zielendport]]")
return m