* core: Added template for a table view of typed sections
[project/luci.git] / applications / luci-fw / src / model / cbi / admin_network / 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:value("")
13 for k,v in pairs(ffluci.sys.net.devices()) do
14         iface:value(v)
15 end
16
17 proto = s:option(ListValue, "proto", "Protokoll")
18 proto:value("tcp", "TCP")
19 proto:value("udp", "UDP")
20 proto:value("tcpudp", "TCP + UDP")
21
22 dport = s:option(Value, "dport", "Externer Port", "Port[:Endport]")
23
24 to = s:option(Value, "to", "Interne Adresse", "IP-Adresse[:Zielport[-Zielendport]]")
25
26 return m