summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-fw/src
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-fw/src')
-rw-r--r--applications/luci-fw/src/model/cbi/admin_network/firewall.lua14
-rw-r--r--applications/luci-fw/src/model/cbi/admin_network/portfw.lua8
-rw-r--r--applications/luci-fw/src/model/cbi/admin_network/routing.lua28
-rw-r--r--applications/luci-fw/src/model/menu/50luci-fw.lua1
4 files changed, 46 insertions, 5 deletions
diff --git a/applications/luci-fw/src/model/cbi/admin_network/firewall.lua b/applications/luci-fw/src/model/cbi/admin_network/firewall.lua
index 4ff15db53e..7c89d07c55 100644
--- a/applications/luci-fw/src/model/cbi/admin_network/firewall.lua
+++ b/applications/luci-fw/src/model/cbi/admin_network/firewall.lua
@@ -13,8 +13,18 @@ chain:value("output", "Output")
chain:value("prerouting", "Prerouting")
chain:value("postrouting", "Postrouting")
-s:option(Value, "iface", "Eingangsschnittstelle").optional = true
-s:option(Value, "oface", "Ausgangsschnittstelle").optional = true
+iface = s:option(ListValue, "iface", "Eingangsschnittstelle")
+iface.optional = true
+
+oface = s:option(ListValue, "oface", "Ausgangsschnittstelle")
+oface.optional = true
+
+for k, v in pairs(ffluci.model.uci.sections("network")) do
+ if v[".type"] == "interface" and k ~= "loopback" then
+ iface:value(k)
+ oface:value(k)
+ end
+end
proto = s:option(ListValue, "proto", "Protokoll")
proto.optional = true
diff --git a/applications/luci-fw/src/model/cbi/admin_network/portfw.lua b/applications/luci-fw/src/model/cbi/admin_network/portfw.lua
index 5ee22336e7..90ebb4c24d 100644
--- a/applications/luci-fw/src/model/cbi/admin_network/portfw.lua
+++ b/applications/luci-fw/src/model/cbi/admin_network/portfw.lua
@@ -9,9 +9,11 @@ s.addremove = true
s.anonymous = true
iface = s:option(ListValue, "iface", "Schnittstelle", "Externe Schnittstelle")
-iface:value("")
-for k,v in pairs(ffluci.sys.net.devices()) do
- iface:value(v)
+iface.default = "wan"
+for k, v in pairs(ffluci.model.uci.sections("network")) do
+ if v[".type"] == "interface" and k ~= "loopback" then
+ iface:value(k)
+ end
end
proto = s:option(ListValue, "proto", "Protokoll")
diff --git a/applications/luci-fw/src/model/cbi/admin_network/routing.lua b/applications/luci-fw/src/model/cbi/admin_network/routing.lua
new file mode 100644
index 0000000000..45016f42b9
--- /dev/null
+++ b/applications/luci-fw/src/model/cbi/admin_network/routing.lua
@@ -0,0 +1,28 @@
+-- ToDo: Translate, Add descriptions and help texts
+require("ffluci.sys")
+m = Map("luci_fw", "Routing", [[An dieser Stelle wird festlegt, welcher Netzverkehr zwischen einzelnen
+Schnittstellen erlaubt werden soll. Es werden jeweils nur neue Verbindungen
+betrachtet, d.h. Pakete von aufgebauten oder zugehörigen Verbindungen werden automatisch in beide Richtungen
+akzeptiert, auch wenn das Feld "beide Richtungen" nicht explizit gesetzt ist.
+NAT ermöglicht Adressübersetzung.]])
+
+s = m:section(TypedSection, "routing")
+s.template = "cbi/tblsection"
+s.addremove = true
+s.anonymous = true
+
+iface = s:option(ListValue, "iface", "Eingang", "Eingangsschnittstelle")
+oface = s:option(ListValue, "oface", "Ausgang", "Ausgangsschnittstelle")
+
+for k, v in pairs(ffluci.model.uci.sections("network")) do
+ if v[".type"] == "interface" and k ~= "loopback" then
+ iface:value(k)
+ oface:value(k)
+ end
+end
+
+s:option(Flag, "fwd", "FWD", "weiterleiten")
+s:option(Flag, "nat", "NAT", "übersetzen")
+s:option(Flag, "bidi", "<->", "beide Richtungen")
+
+return m
diff --git a/applications/luci-fw/src/model/menu/50luci-fw.lua b/applications/luci-fw/src/model/menu/50luci-fw.lua
index 93aba2fabe..b7543b0621 100644
--- a/applications/luci-fw/src/model/menu/50luci-fw.lua
+++ b/applications/luci-fw/src/model/menu/50luci-fw.lua
@@ -1,3 +1,4 @@
sel("admin", "network")
act("portfw", "Portweiterleitung")
+act("routing", "Routing")
act("firewall", "Firewall") \ No newline at end of file