projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix brcm-2.4 target profiles
[openwrt.git]
/
package
/
iptables
/
files
/
firewall.init
diff --git
a/package/iptables/files/firewall.init
b/package/iptables/files/firewall.init
index
731485b
..
6f1ba8b
100755
(executable)
--- a/
package/iptables/files/firewall.init
+++ b/
package/iptables/files/firewall.init
@@
-2,12
+2,13
@@
# Copyright (C) 2006 OpenWrt.org
## Please make changes in /etc/firewall.user
# Copyright (C) 2006 OpenWrt.org
## Please make changes in /etc/firewall.user
-
+START=45
start() {
include /lib/network
scan_interfaces
config_get WAN wan ifname
start() {
include /lib/network
scan_interfaces
config_get WAN wan ifname
+ config_get WANDEV wan device
config_get LAN lan ifname
## CLEAR TABLES
config_get LAN lan ifname
## CLEAR TABLES
@@
-25,6
+26,7
@@
start() {
iptables -N LAN_ACCEPT
[ -z "$WAN" ] || iptables -A LAN_ACCEPT -i "$WAN" -j RETURN
iptables -N LAN_ACCEPT
[ -z "$WAN" ] || iptables -A LAN_ACCEPT -i "$WAN" -j RETURN
+ [ -z "$WANDEV" -o "$WANDEV" = "$WAN" ] || iptables -A LAN_ACCEPT -i "$WANDEV" -j RETURN
iptables -A LAN_ACCEPT -j ACCEPT
### INPUT
iptables -A LAN_ACCEPT -j ACCEPT
### INPUT
@@
-85,7
+87,7
@@
start() {
iptables -A FORWARD -j forwarding_rule
# allow
iptables -A FORWARD -j forwarding_rule
# allow
- iptables -A FORWARD -i
br0 -o br0
-j ACCEPT
+ iptables -A FORWARD -i
$LAN -o $LAN
-j ACCEPT
[ -z "$WAN" ] || iptables -A FORWARD -i $LAN -o $WAN -j ACCEPT
# reject (what to do with anything not allowed earlier)
[ -z "$WAN" ] || iptables -A FORWARD -i $LAN -o $WAN -j ACCEPT
# reject (what to do with anything not allowed earlier)
@@
-99,6
+101,7
@@
start() {
## USER RULES
[ -f /etc/firewall.user ] && . /etc/firewall.user
[ -n "$WAN" -a -e /etc/config/firewall ] && {
## USER RULES
[ -f /etc/firewall.user ] && . /etc/firewall.user
[ -n "$WAN" -a -e /etc/config/firewall ] && {
+ export WAN
awk -f /usr/lib/common.awk -f /usr/lib/firewall.awk /etc/config/firewall | ash
}
}
awk -f /usr/lib/common.awk -f /usr/lib/firewall.awk /etc/config/firewall | ash
}
}
This page took
0.023065 seconds
and
4
git commands to generate.