diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-10-16 15:24:07 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-10-16 15:24:07 +0000 |
commit | 4ad99af940a90592b51729aa44a155f8053fd85b (patch) | |
tree | a7831d514ce075b023b454ffc89f8dd2b2f293dc /applications/luci-fw/luasrc/model/cbi/luci_fw/rrule.lua | |
parent | dd2abf2ea44b02bff72812de593a9e3976fe7f15 (diff) |
applications: rename luci-fw to luci-firewall
Diffstat (limited to 'applications/luci-fw/luasrc/model/cbi/luci_fw/rrule.lua')
-rw-r--r-- | applications/luci-fw/luasrc/model/cbi/luci_fw/rrule.lua | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/applications/luci-fw/luasrc/model/cbi/luci_fw/rrule.lua b/applications/luci-fw/luasrc/model/cbi/luci_fw/rrule.lua deleted file mode 100644 index 63e014444b..0000000000 --- a/applications/luci-fw/luasrc/model/cbi/luci_fw/rrule.lua +++ /dev/null @@ -1,80 +0,0 @@ ---[[ -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") -arg[1] = arg[1] or "" - -m = Map("firewall", translate("Traffic Redirection"), - translate("Traffic redirection allows you to change the " .. - "destination address of forwarded packets.")) - - -s = m:section(NamedSection, arg[1], "redirect", "") -s.anonymous = true -s.addremove = false - -back = s:option(DummyValue, "_overview", translate("Overview")) -back.value = "" -back.titleref = luci.dispatcher.build_url("admin", "network", "firewall", "redirect") - -name = s:option(Value, "_name", translate("Name")) -name.rmempty = true -name.size = 10 - -iface = s:option(ListValue, "src", translate("Source zone")) -iface.default = "wan" -luci.model.uci.cursor():foreach("firewall", "zone", - function (section) - iface:value(section.name) - end) - -s:option(Value, "src_ip", translate("Source IP address")).optional = true -s:option(Value, "src_mac", translate("Source MAC-address")).optional = true - -sport = s:option(Value, "src_port", translate("Source port"), - translate("Match incoming traffic originating from the given " .. - "source port or port range on the client host")) -sport.optional = true -sport:depends("proto", "tcp") -sport:depends("proto", "udp") -sport:depends("proto", "tcpudp") - -proto = s:option(ListValue, "proto", translate("Protocol")) -proto.optional = true -proto:value("") -proto:value("tcp", "TCP") -proto:value("udp", "UDP") -proto:value("tcpudp", "TCP+UDP") - -dport = s:option(Value, "src_dport", translate("External port"), - translate("Match incoming traffic directed at the given " .. - "destination port or port range on this host")) -dport.size = 5 -dport:depends("proto", "tcp") -dport:depends("proto", "udp") -dport:depends("proto", "tcpudp") - -to = s:option(Value, "dest_ip", translate("Internal IP address"), - translate("Redirect matched incoming traffic to the specified " .. - "internal host")) -for i, dataset in ipairs(luci.sys.net.arptable()) do - to:value(dataset["IP address"]) -end - -toport = s:option(Value, "dest_port", translate("Internal port (optional)"), - translate("Redirect matched incoming traffic to the given port on " .. - "the internal host")) -toport.optional = true -toport.size = 5 - -return m |