forked from freifunk-franken/firmware
Adrian Schmutzler
6f132f858e
In some cases (mostly for one-port devices) IF_WAN was used although not set, resulting in not obviously iptables error messages like - Bad argument `conntrack' - Bad argument `REJECT' Thus, check whether IF_WAN is set to something before using it. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Reviewed-by: Robert Langhammer <rlanghammer@web.de>
6 lines
221 B
Plaintext
6 lines
221 B
Plaintext
# Ensure nothing is forwarded onto WAN interface
|
|
if [ -n "$IF_WAN" ]; then
|
|
iptables -A FORWARD -o $IF_WAN -j REJECT --reject-with icmp-net-unreachable
|
|
ip6tables -A FORWARD -o $IF_WAN -j REJECT --reject-with no-route
|
|
fi
|