# 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
+ config_get WANDEV wan device
config_get LAN lan ifname
## CLEAR TABLES
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