* Added DHCP page
[project/luci.git] / src / ffluci / model / cbi / admin_network / firewall.lua
1 -- ToDo: Translate, Add descriptions and help texts
2 m = Map("luci_fw", "Firewall")
3
4 s = m:section(TypedSection, "rule")
5 s.addremove = true
6 s.anonymous = true
7
8 chain = s:option(ListValue, "chain", "Kette")
9 chain:value("forward", "Forward")
10 chain:value("input", "Input")
11 chain:value("output", "Output")
12 chain:value("prerouting", "Prerouting")
13 chain:value("postrouting", "Postrouting")
14
15 s:option(Value, "iface", "Eingangsschnittstelle").optional = true
16 s:option(Value, "oface", "Ausgangsschnittstelle").optional = true
17
18 proto = s:option(ListValue, "proto", "Protokoll")
19 proto.optional = true
20 proto:value("")
21 proto:value("tcp", "TCP")
22 proto:value("udp", "UDP")
23
24 s:option(Value, "source", "Quelladresse").optional = true
25 s:option(Value, "destination", "Zieladresse").optional = true
26
27 sport = s:option(Value, "sport", "Quellport")
28 sport.optional = true
29 sport:depends("proto", "tcp")
30 sport:depends("proto", "udp")
31
32 dport = s:option(Value, "dport", "Zielport")
33 dport.optional = true
34 dport:depends("proto", "tcp")
35 dport:depends("proto", "udp")
36
37 tosrc = s:option(Value, "tosrc", "Neue Quelladresse [SNAT]")
38 tosrc.optional = true
39 tosrc:depends("jump", "SNAT")
40
41 tosrc = s:option(Value, "todest", "Neue Zieladresse [DNAT]")
42 tosrc.optional = true
43 tosrc:depends("jump", "DNAT")
44
45 jump = s:option(ListValue, "jump", "Aktion")
46 jump.rmempty = true
47 jump:value("", "")
48 jump:value("ACCEPT", "annehmen (ACCEPT)")
49 jump:value("REJECT", "zurückweisen (REJECT)")
50 jump:value("DROP", "verwerfen (DROP)")
51 jump:value("LOG", "protokollieren (LOG)")
52 jump:value("DNAT", "Ziel umschreiben (DNAT) [nur Prerouting]")
53 jump:value("MASQUERADE", "maskieren (MASQUERADE) [nur Postrouting]")
54 jump:value("SNAT", "Quelle umschreiben (SNAT) [nur Postrouting]")
55
56
57 add = s:option(Value, "command", "Eigener Befehl")
58 add.size = 50
59 add.rmempty = true
60
61 return m