1 -- ToDo: Translate, Add descriptions and help texts
2 m = Map("luci_fw", "Firewall", [[Mit Hilfe der Firewall können Zugriffe auf das Netzwerk
3 erlaubt, verboten oder umgeleitet werden.]])
5 s = m:section(TypedSection, "rule")
9 chain = s:option(ListValue, "chain", "Kette")
10 chain:value("forward", "Forward")
11 chain:value("input", "Input")
12 chain:value("output", "Output")
13 chain:value("prerouting", "Prerouting")
14 chain:value("postrouting", "Postrouting")
16 iface = s:option(ListValue, "iface", "Eingangsschnittstelle")
19 oface = s:option(ListValue, "oface", "Ausgangsschnittstelle")
22 for k, v in pairs(luci.model.uci.sections("network")) do
23 if v[".type"] == "interface" and k ~= "loopback" then
29 proto = s:option(ListValue, "proto", "Protokoll")
32 proto:value("tcp", "TCP")
33 proto:value("udp", "UDP")
35 s:option(Value, "source", "Quelladresse").optional = true
36 s:option(Value, "destination", "Zieladresse").optional = true
37 s:option(Value, "mac", "MAC-Adresse").optional = true
39 sport = s:option(Value, "sport", "Quellport")
41 sport:depends("proto", "tcp")
42 sport:depends("proto", "udp")
44 dport = s:option(Value, "dport", "Zielport")
46 dport:depends("proto", "tcp")
47 dport:depends("proto", "udp")
49 tosrc = s:option(Value, "tosrc", "Neue Quelladresse [SNAT]")
51 tosrc:depends("jump", "SNAT")
53 tosrc = s:option(Value, "todest", "Neue Zieladresse [DNAT]")
55 tosrc:depends("jump", "DNAT")
57 jump = s:option(ListValue, "jump", "Aktion")
60 jump:value("ACCEPT", "annehmen (ACCEPT)")
61 jump:value("REJECT", "zurückweisen (REJECT)")
62 jump:value("DROP", "verwerfen (DROP)")
63 jump:value("LOG", "protokollieren (LOG)")
64 jump:value("DNAT", "Ziel umschreiben (DNAT) [nur Prerouting]")
65 jump:value("MASQUERADE", "maskieren (MASQUERADE) [nur Postrouting]")
66 jump:value("SNAT", "Quelle umschreiben (SNAT) [nur Postrouting]")
69 add = s:option(Value, "command", "Eigener Befehl")