90ebb4c24daf8dda39de4a1cc07da1519495c1bd
[project/luci.git] / applications / luci-fw / src / model / cbi / luci_fw / portfw.lua
1 -- ToDo: Translate, Add descriptions and help texts
2 require("ffluci.sys")
3 m = Map("luci_fw", "Portweiterleitung", [[Portweiterleitungen ermöglichen es interne
4 Netzwerkdienste von einem anderen externen Netzwerk aus erreichbar zu machen.]])
5
6 s = m:section(TypedSection, "portfw")
7 s.template  = "cbi/tblsection"
8 s.addremove = true
9 s.anonymous = true
10
11 iface = s:option(ListValue, "iface", "Schnittstelle", "Externe Schnittstelle")
12 iface.default = "wan"
13 for k, v in pairs(ffluci.model.uci.sections("network")) do
14         if v[".type"] == "interface" and k ~= "loopback" then
15                 iface:value(k)
16         end
17 end
18
19 proto = s:option(ListValue, "proto", "Protokoll")
20 proto:value("tcp", "TCP")
21 proto:value("udp", "UDP")
22 proto:value("tcpudp", "TCP + UDP")
23
24 dport = s:option(Value, "dport", "Externer Port", "Port[:Endport]")
25
26 to = s:option(Value, "to", "Interne Adresse", "IP-Adresse[:Zielport[-Zielendport]]")
27
28 return m