luci/applications/luci-fw/luasrc/model/cbi/luci_fw/portfw.lua
Steven Barth d35a620e9f commit 4f6198094cf4134179d1f9c9fa8f79759a27c87e
Author: Felix Fietkau <nbd@openwrt.org>
Date:   Tue May 27 13:56:12 2008 +0200

    rename src/ to luasrc/
2008-05-27 12:23:39 +00:00

28 lines
890 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"
for k, v in pairs(luci.model.uci.sections("network")) do
if v[".type"] == "interface" and k ~= "loopback" then
iface:value(k)
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