From 184f13334f470141420a189220dd3b951aac4480 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Mon, 31 Mar 2008 22:24:32 +0000 Subject: * Fixed haserl-lua Makefile * Fixed a bug in CBI that occured when target UCI is empty * Added frontend for port forwarding / firewall pages --- src/ffluci/model/cbi/admin_network/firewall.lua | 37 +++++++++++++++++++++++++ src/ffluci/model/cbi/admin_network/portfw.lua | 18 ++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 src/ffluci/model/cbi/admin_network/firewall.lua create mode 100644 src/ffluci/model/cbi/admin_network/portfw.lua (limited to 'src/ffluci/model/cbi') diff --git a/src/ffluci/model/cbi/admin_network/firewall.lua b/src/ffluci/model/cbi/admin_network/firewall.lua new file mode 100644 index 0000000000..fc7bea61bc --- /dev/null +++ b/src/ffluci/model/cbi/admin_network/firewall.lua @@ -0,0 +1,37 @@ +-- ToDo: Translate, Add descriptions and help texts +m = Map("luci_fw", "Firewall") + +s = m:section(TypedSection, "rule") +s.addremove = 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") + +s:option(Value, "iface", "Eingangsschnittstelle").optional = true +s:option(Value, "oface", "Ausgangsschnittstelle").optional = true +s:option(Value, "proto", "Protokoll").optional = true +s:option(Value, "source", "Quelladresse").optional = true +s:option(Value, "destination", "Zieladresse").optional = true +s:option(Value, "sport", "Quellports").optional = true +s:option(Value, "dport", "Zielports").optional = true +s:option(Value, "to", "Neues Ziel").optional = true + +state = s:option(MultiValue, "state", "Status") +state.optional = true +state.delimiter = "," +state:value("NEW", "neu") +state:value("ESTABLISHED", "etabliert") +state:value("RELATED", "zugehörig") +state:value("INVALID", "ungültig") + +s:option(Value, "jump", "Aktion", "ACCEPT, REJECT, DROP, MASQUERADE, DNAT, SNAT, ...").optional = true + + +add = s:option(Value, "command", "Befehl") +add.size = 50 + +return m \ No newline at end of file diff --git a/src/ffluci/model/cbi/admin_network/portfw.lua b/src/ffluci/model/cbi/admin_network/portfw.lua new file mode 100644 index 0000000000..6f8822a89a --- /dev/null +++ b/src/ffluci/model/cbi/admin_network/portfw.lua @@ -0,0 +1,18 @@ +-- ToDo: Translate, Add descriptions and help texts +m = Map("luci_fw", "Portweiterleitung") + +s = m:section(TypedSection, "portfw") +s.addremove = true +s.anonymous = true + +iface = s:option(Value, "in_interface", "Externes Interface") + +proto = s:option(ListValue, "proto", "Protokoll") +proto:value("tcp", "TCP") +proto:value("udp", "UDP") + +dport = s:option(Value, "dport", "Externer Port", "Port[:Endport]") + +to = s:option(Value, "to", "Interne Adresse", "IP-Adresse[:Zielport[-Zielendport]]") + +return m \ No newline at end of file -- cgit v1.2.3