diff options
author | Steven Barth <steven@midlink.org> | 2008-05-27 12:23:39 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-05-27 12:23:39 +0000 |
commit | d35a620e9f5665a94967f4bd02c93581a1dd7e00 (patch) | |
tree | cbe7a9b9fe71e40d850c649361c87608d56ea48b /applications/luci-fw/luasrc/model/cbi/luci_fw | |
parent | 5df565faba5eb0c26a7ce0e2d6e9092bf71cb1e8 (diff) |
commit 4f6198094cf4134179d1f9c9fa8f79759a27c87e
Author: Felix Fietkau <nbd@openwrt.org>
Date: Tue May 27 13:56:12 2008 +0200
rename src/ to luasrc/
Diffstat (limited to 'applications/luci-fw/luasrc/model/cbi/luci_fw')
3 files changed, 129 insertions, 0 deletions
diff --git a/applications/luci-fw/luasrc/model/cbi/luci_fw/firewall.lua b/applications/luci-fw/luasrc/model/cbi/luci_fw/firewall.lua new file mode 100644 index 000000000..f58f74c2b --- /dev/null +++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/firewall.lua @@ -0,0 +1,73 @@ +-- ToDo: Translate, Add descriptions and help texts +m = Map("luci_fw", "Firewall", [[Mit Hilfe der Firewall können Zugriffe auf das Netzwerk +erlaubt, verboten oder umgeleitet werden.]]) + +s = m:section(TypedSection, "rule") +s.addremove = true +s.anonymous = true + +chain = s:option(ListValue, "chain", "Kette") +chain:value("forward", "Forward") +chain:value("input", "Input") +chain:value("output", "Output") +chain:value("prerouting", "Prerouting") +chain:value("postrouting", "Postrouting") + +iface = s:option(ListValue, "iface", "Eingangsschnittstelle") +iface.optional = true + +oface = s:option(ListValue, "oface", "Ausgangsschnittstelle") +oface.optional = true + +for k, v in pairs(luci.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 +proto:value("") +proto:value("tcp", "TCP") +proto:value("udp", "UDP") + +s:option(Value, "source", "Quelladresse").optional = true +s:option(Value, "destination", "Zieladresse").optional = true +s:option(Value, "mac", "MAC-Adresse").optional = true + +sport = s:option(Value, "sport", "Quellport") +sport.optional = true +sport:depends("proto", "tcp") +sport:depends("proto", "udp") + +dport = s:option(Value, "dport", "Zielport") +dport.optional = true +dport:depends("proto", "tcp") +dport:depends("proto", "udp") + +tosrc = s:option(Value, "tosrc", "Neue Quelladresse [SNAT]") +tosrc.optional = true +tosrc:depends("jump", "SNAT") + +tosrc = s:option(Value, "todest", "Neue Zieladresse [DNAT]") +tosrc.optional = true +tosrc:depends("jump", "DNAT") + +jump = s:option(ListValue, "jump", "Aktion") +jump.rmempty = true +jump:value("", "") +jump:value("ACCEPT", "annehmen (ACCEPT)") +jump:value("REJECT", "zurückweisen (REJECT)") +jump:value("DROP", "verwerfen (DROP)") +jump:value("LOG", "protokollieren (LOG)") +jump:value("DNAT", "Ziel umschreiben (DNAT) [nur Prerouting]") +jump:value("MASQUERADE", "maskieren (MASQUERADE) [nur Postrouting]") +jump:value("SNAT", "Quelle umschreiben (SNAT) [nur Postrouting]") + + +add = s:option(Value, "command", "Eigener Befehl") +add.size = 50 +add.rmempty = true + +return m diff --git a/applications/luci-fw/luasrc/model/cbi/luci_fw/portfw.lua b/applications/luci-fw/luasrc/model/cbi/luci_fw/portfw.lua new file mode 100644 index 000000000..e4f4fa2ac --- /dev/null +++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/portfw.lua @@ -0,0 +1,28 @@ +-- 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 diff --git a/applications/luci-fw/luasrc/model/cbi/luci_fw/routing.lua b/applications/luci-fw/luasrc/model/cbi/luci_fw/routing.lua new file mode 100644 index 000000000..364e69f62 --- /dev/null +++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/routing.lua @@ -0,0 +1,28 @@ +-- ToDo: Translate, Add descriptions and help texts +require("luci.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(luci.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").rmempty = true +s:option(Flag, "nat", "NAT", "übersetzen").rmempty = true +s:option(Flag, "bidi", "<->", "beide Richtungen").rmempty = true + +return m |