aboutsummaryrefslogtreecommitdiffstats
path: root/package/iptables/files/firewall.awk
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2008-08-04 11:51:58 +0000
committerJohn Crispin <blogic@openwrt.org>2008-08-04 11:51:58 +0000
commit275038cae7e3e363c1e0062d0639749178659a8b (patch)
tree366e67ab18afcef24dc1dfd1f5fb39eb7484275f /package/iptables/files/firewall.awk
parent8ffee3956dc468134bb14f47a7c82f248b9671ff (diff)
downloadupstream-275038cae7e3e363c1e0062d0639749178659a8b.tar.gz
upstream-275038cae7e3e363c1e0062d0639749178659a8b.tar.bz2
upstream-275038cae7e3e363c1e0062d0639749178659a8b.zip
adds a new uci firewall
- iptbales and netfilter packages need to be rewrapped when we switch to this firewall as default - there are some examples in the file /etc/config/firewall - iptables-save/restore are still missing - hotplug takes care of adding/removing netdevs during runtime - misisng features ? wishes ? let me know ... git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12089 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/iptables/files/firewall.awk')
-rw-r--r--package/iptables/files/firewall.awk50
1 files changed, 0 insertions, 50 deletions
diff --git a/package/iptables/files/firewall.awk b/package/iptables/files/firewall.awk
deleted file mode 100644
index 31dbae0f33..0000000000
--- a/package/iptables/files/firewall.awk
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright (C) 2006 OpenWrt.org
-
-BEGIN {
- FS=":"
-}
-
-($1 == "accept") || ($1 == "drop") || ($1 == "forward") {
- delete _opt
- str2data($2)
- if ((_l["proto"] == "") && (_l["sport"] _l["dport"] != "")) {
- _opt[0] = " -p tcp"
- _opt[1] = " -p udp"
- } else {
- _opt[0] = ""
- }
-}
-
-($1 == "accept") {
- target = " -j ACCEPT"
- for (o in _opt) {
- print "iptables -t nat -A prerouting_wan" _opt[o] str2ipt($2) target
- print "iptables -A input_wan " _opt[o] str2ipt($2) target
- print ""
- }
-}
-
-($1 == "drop") {
- for (o in _opt) {
- print "iptables -t nat -A prerouting_wan" _opt[o] str2ipt($2) " -j DROP"
- print ""
- }
-}
-
-($1 == "forward") {
- target = " -j DNAT --to " $3
- fwopts = ""
- if ($4 != "") {
- if ((_l["proto"] == "tcp") || (_l["proto"] == "udp") || (_l["proto"] == "")) {
- if (_l["proto"] != "") fwopts = " -p " _l["proto"]
- fwopts = fwopts " --dport " $4
- target = target ":" $4
- }
- else fwopts = ""
- }
- for (o in _opt) {
- print "iptables -t nat -A prerouting_wan" _opt[o] str2ipt($2) target
- print "iptables -A forwarding_wan " _opt[o] " -d " $3 fwopts " -j ACCEPT"
- print ""
- }
-}