2016-11-14 00:40:55 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2017-11-12 00:33:29 +01:00
|
|
|
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
|
|
|
|
2018-01-20 18:43:19 +01:00
|
|
|
if [ "$IFACE" = "lo" ]; then
|
|
|
|
iptables -I INPUT -i lo -j ACCEPT
|
|
|
|
ip6tables -I INPUT -i lo -j ACCEPT
|
|
|
|
fi
|
2016-11-15 01:33:17 +01:00
|
|
|
if [ "$IFACE" = "{{ interface }}" ]; then
|
2016-11-14 23:44:13 +01:00
|
|
|
iptables -A INPUT -i "$IFACE" -m state --state ESTABLISHED,RELATED -j ACCEPT
|
2018-01-20 18:43:19 +01:00
|
|
|
ip6tables -A INPUT -i "$IFACE" -m state --state ESTABLISHED,RELATED -j ACCEPT
|
2018-04-15 20:42:55 +02:00
|
|
|
iptables -A INPUT -i "$IFACE" -p icmp -j ACCEPT
|
2018-09-13 23:46:28 +02:00
|
|
|
ip6tables -A INPUT -i "$IFACE" -p icmpv6 -j ACCEPT
|
2018-06-22 23:06:34 +02:00
|
|
|
# DHCPv6
|
|
|
|
ip6tables -A INPUT -i "$IFACE" -p udp --sport 547 --dport 546 -j ACCEPT
|
2016-11-14 00:40:55 +01:00
|
|
|
iptables -A INPUT -i "$IFACE" -j DROP
|
2018-01-20 18:43:19 +01:00
|
|
|
ip6tables -A INPUT -i "$IFACE" -j DROP
|
2016-11-14 00:40:55 +01:00
|
|
|
iptables -P INPUT ACCEPT
|
2018-01-20 18:43:19 +01:00
|
|
|
ip6tables -P INPUT ACCEPT
|
2016-11-14 00:40:55 +01:00
|
|
|
fi
|