1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| iptables -I INPUT 1 -m tcp -p tcp --dport 111 -j DROP iptables -I INPUT 1 -m udp -p udp --dport 111 -j DROP
iptables -A INPUT -s 127.0.0.0/8 -p tcp -m state --state NEW,ESTABLISHED -m tcp --dport 2049 -j ACCEPT iptables -A INPUT -s 127.0.0.0/8 -p udp -m state --state NEW,ESTABLISHED -m udp --dport 2049 -j ACCEPT
iptables -A INPUT -s 10.0.0.0/8 -p tcp -m state --state NEW,ESTABLISHED -m tcp --dport 2049 -j ACCEPT iptables -A INPUT -s 10.0.0.0/8 -p udp -m state --state NEW,ESTABLISHED -m udp --dport 2049 -j ACCEPT
iptables -A INPUT -s 172.16.0.0/12 -p tcp -m state --state NEW,ESTABLISHED -m tcp --dport 2049 -j ACCEPT iptables -A INPUT -s 172.16.0.0/12 -p udp -m state --state NEW,ESTABLISHED -m udp --dport 2049 -j ACCEPT
iptables -A INPUT -s 192.168.0.0/16 -p tcp -m state --state NEW,ESTABLISHED -m tcp --dport 2049 -j ACCEPT iptables -A INPUT -s 192.168.0.0/16 -p udp -m state --state NEW,ESTABLISHED -m udp --dport 2049 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 2049 -j DROP iptables -A INPUT -p udp -m udp --dport 2049 -j DROP
|