* Mördercommit ;-)
[project/luci.git] / applications / luci-fw / src / model / cbi / admin_network / firewall.lua
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.]])
4
5 s = m:section(TypedSection, "rule")
6 s.addremove = true
7 s.anonymous = true
8
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")
15
16 s:option(Value, "iface", "Eingangsschnittstelle").optional = true
17 s:option(Value, "oface", "Ausgangsschnittstelle").optional = true
18
19 proto = s:option(ListValue, "proto", "Protokoll")
20 proto.optional = true
21 proto:value("")
22 proto:value("tcp", "TCP")
23 proto:value("udp", "UDP")
24
25 s:option(Value, "source", "Quelladresse").optional = true
26 s:option(Value, "destination", "Zieladresse").optional = true
27 s:option(Value, "mac", "MAC-Adresse").optional = true
28
29 sport = s:option(Value, "sport", "Quellport")
30 sport.optional = true
31 sport:depends("proto", "tcp")
32 sport:depends("proto", "udp")
33
34 dport = s:option(Value, "dport", "Zielport")
35 dport.optional = true
36 dport:depends("proto", "tcp")
37 dport:depends("proto", "udp")
38
39 tosrc = s:option(Value, "tosrc", "Neue Quelladresse [SNAT]")
40 tosrc.optional = true
41 tosrc:depends("jump", "SNAT")
42
43 tosrc = s:option(Value, "todest", "Neue Zieladresse [DNAT]")
44 tosrc.optional = true
45 tosrc:depends("jump", "DNAT")
46
47 jump = s:option(ListValue, "jump", "Aktion")
48 jump.rmempty = true
49 jump:value("", "")
50 jump:value("ACCEPT", "annehmen (ACCEPT)")
51 jump:value("REJECT", "zurückweisen (REJECT)")
52 jump:value("DROP", "verwerfen (DROP)")
53 jump:value("LOG", "protokollieren (LOG)")
54 jump:value("DNAT", "Ziel umschreiben (DNAT) [nur Prerouting]")
55 jump:value("MASQUERADE", "maskieren (MASQUERADE) [nur Postrouting]")
56 jump:value("SNAT", "Quelle umschreiben (SNAT) [nur Postrouting]")
57
58
59 add = s:option(Value, "command", "Eigener Befehl")
60 add.size = 50
61 add.rmempty = true
62
63 return m