summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-fw
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-fw')
-rw-r--r--applications/luci-fw/luasrc/controller/luci_fw/luci_fw.lua9
-rw-r--r--applications/luci-fw/luasrc/i18n/luci-fw.de.lua42
-rw-r--r--applications/luci-fw/luasrc/i18n/luci-fw.en.lua43
-rw-r--r--applications/luci-fw/luasrc/model/cbi/luci_fw/firewall.lua57
-rw-r--r--applications/luci-fw/luasrc/model/cbi/luci_fw/portfw.lua25
-rw-r--r--applications/luci-fw/luasrc/model/cbi/luci_fw/routing.lua31
6 files changed, 162 insertions, 45 deletions
diff --git a/applications/luci-fw/luasrc/controller/luci_fw/luci_fw.lua b/applications/luci-fw/luasrc/controller/luci_fw/luci_fw.lua
index 419097066..4efddb6e7 100644
--- a/applications/luci-fw/luasrc/controller/luci_fw/luci_fw.lua
+++ b/applications/luci-fw/luasrc/controller/luci_fw/luci_fw.lua
@@ -1,7 +1,10 @@
module("luci.controller.luci_fw.luci_fw", package.seeall)
function index()
- entry({"admin", "network", "portfw"}, cbi("luci_fw/portfw"), "Portweiterleitung", 70)
- entry({"admin", "network", "routing"}, cbi("luci_fw/routing"), "Routing", 72)
- entry({"admin", "network", "firewall"}, cbi("luci_fw/firewall"), "Firewall", 74)
+ require("luci.i18n").loadc("luci-fw")
+ local i18n = luci.i18n.translate
+
+ entry({"admin", "network", "portfw"}, cbi("luci_fw/portfw"), i18n("fw_portfw", "Portweiterleitung"), 70).i18n = "luci-fw"
+ entry({"admin", "network", "routing"}, cbi("luci_fw/routing"), i18n("fw_routing", "Routing"), 73).i18n = "luci-fw"
+ entry({"admin", "network", "firewall"}, cbi("luci_fw/firewall"), i18n("fw_fw", "Firewall"), 76).i18n = "luci-fw"
end \ No newline at end of file
diff --git a/applications/luci-fw/luasrc/i18n/luci-fw.de.lua b/applications/luci-fw/luasrc/i18n/luci-fw.de.lua
new file mode 100644
index 000000000..08d81dcca
--- /dev/null
+++ b/applications/luci-fw/luasrc/i18n/luci-fw.de.lua
@@ -0,0 +1,42 @@
+fw_fw1 = [[Mit Hilfe der Firewall können Zugriffe auf das Netzwerk
+erlaubt, verboten oder umgeleitet werden.]]
+lucifw_rule_chain = "Kette"
+lucifw_rule_iface = "Eingangsschnittstelle"
+lucifw_rule_oface = "Ausgangsschnittstelle"
+lucifw_rule_source = "Quelladresse"
+lucifw_rule_destination = "Zieladresse"
+lucifw_rule_mac = "MAC-Adresse"
+lucifw_rule_sport = "Quellport"
+lucifw_rule_dport = "Zielport"
+lucifw_rule_tosrc = "Neue Quelladresse [SNAT]"
+lucifw_rule_todest = "Neue Zieladresse [DNAT]"
+lucifw_rule_jump = "Aktion"
+lucifw_rule_command = "Eigener Befehl"
+fw_accept = "annehmen (ACCEPT)"
+fw_reject = "zurückweisen (REJECT)"
+fw_drop = "verwerfen (DROP)"
+fw_log = "protokollieren (LOG)"
+fw_dnat = "Ziel umschreiben (DNAT) [nur Prerouting]"
+fw_masq = "maskieren (MASQUERADE) [nur Postrouting]"
+fw_snat = "Quelle umschreiben (SNAT) [nur Postrouting]"
+
+fw_portfw1 = [[Portweiterleitungen ermöglichen es interne
+Netzwerkdienste von einem anderen externen Netzwerk aus erreichbar zu machen.]]
+lucifw_portfw_iface_desc = "Externe Schnittstelle"
+lucifw_portfw_dport = "Externer Port"
+lucifw_portfw_dport_desc = "Port[:Endport]"
+lucifw_portfw_to = "Interne Adresse"
+lucifw_portfw_to_desc = "IP-Adresse[:Zielport[-Zielendport]]"
+
+fw_routing1 = [[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.]]
+lucifw_routing_iface = "Eingang"
+lucifw_routing_iface_desc = lucifw_rule_iface
+lucifw_routing_oface = "Ausgang"
+lucifw_routing_oface_desc = lucifw_rule_oface
+lucifw_routing_fwd_desc = "weiterleiten"
+lucifw_routing_nat_desc = "übersetzen"
+lucifw_routing_bidi_desc = "beide Richtungen" \ No newline at end of file
diff --git a/applications/luci-fw/luasrc/i18n/luci-fw.en.lua b/applications/luci-fw/luasrc/i18n/luci-fw.en.lua
new file mode 100644
index 000000000..b822c8171
--- /dev/null
+++ b/applications/luci-fw/luasrc/i18n/luci-fw.en.lua
@@ -0,0 +1,43 @@
+fw_portfw = "Port forwarding"
+fw_routing = "Routing"
+fw_fw = "Firewall"
+fw_fw1 = "Here you can grant, access or redirect network traffic."
+lucifw_rule_chain = "Chain"
+lucifw_rule_iface = "Input interface"
+lucifw_rule_oface = "Output interface"
+lucifw_rule_source = "Source address"
+lucifw_rule_destination = "Destination address"
+lucifw_rule_mac = "MAC-Address"
+lucifw_rule_sport = "Source port"
+lucifw_rule_dport = "Destination port"
+lucifw_rule_tosrc = "New source address [SNAT]"
+lucifw_rule_todest = "New target address [DNAT]"
+lucifw_rule_jump = "Action"
+lucifw_rule_command = "Custom Command"
+fw_accept = "accept"
+fw_reject = "reject"
+fw_drop = "drop"
+fw_log = "log"
+fw_dnat = "change destination (DNAT) [prerouting only]"
+fw_masq = "masquerade [postrouting only]"
+fw_snat = "change source (SNAT) [postrouting only]"
+
+fw_portfw1 = [[Port forwarding allows to provide network services
+in the internal network to an external network.]]
+lucifw_portfw_iface_desc = "External interface"
+lucifw_portfw_dport = "External port"
+lucifw_portfw_dport_desc = "Port[:last port]"
+lucifw_portfw_to = "Internal address"
+lucifw_portfw_to_desc = "IP-address[:target port[-last port]]"
+
+fw_routing1 = [[Here you can specify which network traffic is allowed to flow between network interfaces.
+Only new connections will be matched. Packets belonging to already open connections are automatically allowed
+to pass the firewall in this case you do not need to set the "bidirectional" flag. NAT provides
+address translation.]]
+lucifw_routing_iface = "Input"
+lucifw_routing_iface_desc = lucifw_rule_iface
+lucifw_routing_oface = "Output"
+lucifw_routing_oface_desc = lucifw_rule_oface
+lucifw_routing_fwd_desc = "forward"
+lucifw_routing_nat_desc = "translate"
+lucifw_routing_bidi_desc = "bidirectional" \ No newline at end of file
diff --git a/applications/luci-fw/luasrc/model/cbi/luci_fw/firewall.lua b/applications/luci-fw/luasrc/model/cbi/luci_fw/firewall.lua
index 6bd7f083d..b04e0532d 100644
--- a/applications/luci-fw/luasrc/model/cbi/luci_fw/firewall.lua
+++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/firewall.lua
@@ -1,22 +1,33 @@
--- 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.]])
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2008 Steven Barth <steven@midlink.org>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+m = Map("luci_fw", translate("fw_fw", "Firewall"), translate("fw_fw1"))
s = m:section(TypedSection, "rule", "")
s.addremove = true
s.anonymous = true
-chain = s:option(ListValue, "chain", "Kette")
+chain = s:option(ListValue, "chain")
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 = s:option(ListValue, "iface")
iface.optional = true
-oface = s:option(ListValue, "oface", "Ausgangsschnittstelle")
+oface = s:option(ListValue, "oface")
oface.optional = true
luci.model.uci.foreach("network", "interface",
@@ -27,47 +38,47 @@ luci.model.uci.foreach("network", "interface",
end
end)
-proto = s:option(ListValue, "proto", "Protokoll")
+proto = s:option(ListValue, "proto", translate("protocol", "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
+s:option(Value, "source").optional = true
+s:option(Value, "destination").optional = true
+s:option(Value, "mac").optional = true
-sport = s:option(Value, "sport", "Quellport")
+sport = s:option(Value, "sport")
sport.optional = true
sport:depends("proto", "tcp")
sport:depends("proto", "udp")
-dport = s:option(Value, "dport", "Zielport")
+dport = s:option(Value, "dport")
dport.optional = true
dport:depends("proto", "tcp")
dport:depends("proto", "udp")
-tosrc = s:option(Value, "tosrc", "Neue Quelladresse [SNAT]")
+tosrc = s:option(Value, "tosrc")
tosrc.optional = true
tosrc:depends("jump", "SNAT")
-tosrc = s:option(Value, "todest", "Neue Zieladresse [DNAT]")
+tosrc = s:option(Value, "todest")
tosrc.optional = true
tosrc:depends("jump", "DNAT")
-jump = s:option(ListValue, "jump", "Aktion")
+jump = s:option(ListValue, "jump")
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]")
+jump:value("ACCEPT", translate("fw_accept"))
+jump:value("REJECT", translate("fw_reject"))
+jump:value("DROP", translate("fw_drop"))
+jump:value("LOG", translate("fw_log"))
+jump:value("DNAT", translate("fw_dnat"))
+jump:value("MASQUERADE", translate("fw_masq"))
+jump:value("SNAT", translate("fw_snat"))
-add = s:option(Value, "command", "Eigener Befehl")
+add = s:option(Value, "command")
add.size = 50
add.rmempty = true
diff --git a/applications/luci-fw/luasrc/model/cbi/luci_fw/portfw.lua b/applications/luci-fw/luasrc/model/cbi/luci_fw/portfw.lua
index 3923886dd..655bcccef 100644
--- a/applications/luci-fw/luasrc/model/cbi/luci_fw/portfw.lua
+++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/portfw.lua
@@ -1,14 +1,25 @@
--- ToDo: Translate, Add descriptions and help texts
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2008 Steven Barth <steven@midlink.org>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
require("luci.sys")
-m = Map("luci_fw", "Portweiterleitung", [[Portweiterleitungen ermöglichen es interne
-Netzwerkdienste von einem anderen externen Netzwerk aus erreichbar zu machen.]])
+m = Map("luci_fw", translate("fw_portfw", "Portweiterleitung"), translate("fw_portfw1"))
s = m:section(TypedSection, "portfw", "")
s.template = "cbi/tblsection"
s.addremove = true
s.anonymous = true
-iface = s:option(ListValue, "iface", "Schnittstelle", "Externe Schnittstelle")
+iface = s:option(ListValue, "iface", translate("interface", "Schnittstelle"))
iface.default = "wan"
luci.model.uci.foreach("network", "interface",
function (section)
@@ -17,13 +28,13 @@ luci.model.uci.foreach("network", "interface",
end
end)
-proto = s:option(ListValue, "proto", "Protokoll")
+proto = s:option(ListValue, "proto", translate("protocol", "Protokoll"))
proto:value("tcp", "TCP")
proto:value("udp", "UDP")
proto:value("tcpudp", "TCP + UDP")
-dport = s:option(Value, "dport", "Externer Port", "Port[:Endport]")
+dport = s:option(Value, "dport")
-to = s:option(Value, "to", "Interne Adresse", "IP-Adresse[:Zielport[-Zielendport]]")
+to = s:option(Value, "to")
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
index 7ecc8224b..184fc1830 100644
--- a/applications/luci-fw/luasrc/model/cbi/luci_fw/routing.lua
+++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/routing.lua
@@ -1,18 +1,25 @@
--- 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.]])
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2008 Steven Barth <steven@midlink.org>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+m = Map("luci_fw", translate("fw_routing", "Routing"), translate("fw_routing1"))
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")
+iface = s:option(ListValue, "iface")
+oface = s:option(ListValue, "oface")
luci.model.uci.foreach("network", "interface",
function (section)
@@ -22,8 +29,8 @@ luci.model.uci.foreach("network", "interface",
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
+s:option(Flag, "fwd", "FWD").rmempty = true
+s:option(Flag, "nat", "NAT").rmempty = true
+s:option(Flag, "bidi", "<->").rmempty = true
return m