# vim: ft=sh rules4=( "-t nat -A POSTROUTING -o tun+ -j MASQUERADE" "-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT" "-A INPUT -p icmp -m icmp --icmp-type source-quench -j REJECT --reject-with icmp-host-prohibited" "-A INPUT -p icmp -j ACCEPT" "-A INPUT -i lo -j ACCEPT" "-A INPUT -i ippp+ -j ACCEPT" "-A INPUT -m state --state NEW -m udp -p udp --dport 631 -j ACCEPT" "-A INPUT -m state --state NEW -m tcp -p tcp --dport 631 -j ACCEPT" "-A INPUT -m state --state NEW -m udp -p udp --dport 631 -j ACCEPT" "-A INPUT -m state --state NEW -m udp -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT" "-A INPUT -p ah -j ACCEPT" "-A INPUT -p esp -j ACCEPT" "-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT" "-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT" "-A INPUT -m state --state NEW -m tcp -p tcp --dport 53 -j ACCEPT" "-A INPUT -m state --state NEW -m udp -p udp --dport 53 -j ACCEPT" "-A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT" "-A FORWARD -p icmp -m icmp --icmp-type source-quench -j REJECT --reject-with icmp-host-prohibited" "-A FORWARD -p icmp -j ACCEPT" "-A FORWARD -i lo -j ACCEPT" "-A FORWARD -i ippp+ -j ACCEPT" "-A FORWARD -o tun+ -j ACCEPT" "-A INPUT -j REJECT --reject-with icmp-host-prohibited" "-A FORWARD -j REJECT --reject-with icmp-host-prohibited" ) rules6=( "-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT" "-A INPUT -p ipv6-icmp -j ACCEPT" "-A INPUT -i lo -j ACCEPT" "-A INPUT -m state --state NEW -m udp -p udp --dport 546 -d fe80::/64 -j ACCEPT" "-A INPUT -i ippp+ -j ACCEPT" "-A INPUT -m state --state NEW -m udp -p udp --dport 631 -j ACCEPT" "-A INPUT -m state --state NEW -m tcp -p tcp --dport 631 -j ACCEPT" "-A INPUT -m state --state NEW -m udp -p udp --dport 631 -j ACCEPT" "-A INPUT -m state --state NEW -m udp -p udp --dport 5353 -d ff02::fb -j ACCEPT" "-A INPUT -m ipv6header --header ah -j ACCEPT" "-A INPUT -m ipv6header --header esp -j ACCEPT" "-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT" "-A INPUT -m state --state NEW -m tcp -p tcp --dport 53 -j ACCEPT" "-A INPUT -m state --state NEW -m udp -p udp --dport 53 -j ACCEPT" "-A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT" "-A FORWARD -p ipv6-icmp -j ACCEPT" "-A FORWARD -i lo -j ACCEPT" "-A FORWARD -i ippp+ -j ACCEPT" "-A INPUT -j REJECT --reject-with icmp6-adm-prohibited" "-A FORWARD -j REJECT --reject-with icmp6-adm-prohibited" )