2018-04-14 21:42:54 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
|
|
|
|
2018-04-14 21:49:28 +02:00
|
|
|
if echo "$IFACE" | grep priv >/dev/null; then
|
2018-04-14 21:42:54 +02:00
|
|
|
iptables -F FORWARD
|
|
|
|
ip6tables -F FORWARD
|
|
|
|
iptables -P FORWARD DROP
|
|
|
|
ip6tables -P FORWARD DROP
|
|
|
|
iptables -A FORWARD -m state --state ESTABLISHED -j ACCEPT
|
|
|
|
ip6tables -A FORWARD -m state --state ESTABLISHED -j ACCEPT
|
|
|
|
# loopback
|
|
|
|
iptables -A FORWARD -i lo -j ACCEPT
|
|
|
|
ip6tables -A FORWARD -i lo -j ACCEPT
|
2018-04-14 21:50:38 +02:00
|
|
|
# Trust priv
|
|
|
|
iptables -A FORWARD -i $IFACE -j ACCEPT
|
|
|
|
ip6tables -A FORWARD -i $IFACE -j ACCEPT
|
2018-04-14 21:42:54 +02:00
|
|
|
# Deny by default
|
|
|
|
iptables -A FORWARD -j REJECT
|
|
|
|
ip6tables -A FORWARD -j REJECT
|
|
|
|
fi
|