Created
July 3, 2017 14:21
-
-
Save jchuahtacc/f7ef4a633a0ce1d9c58cdd8f30a520e5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iptables -F | |
iptables -P INPUT DROP | |
iptables -P FORWARD DROP | |
iptables -P OUTPUT ACCEPT | |
iptables -A INPUT -i lo -j ACCEPT | |
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
iptables -A INPUT -p tcp --dport 22 -j ACCEPT | |
iptables -A INPUT -p tcp --dport 111 -j ACCEPT | |
iptables -A INPUT -p udp --dport 111 -j ACCEPT | |
iptables -A INPUT -p tcp --dport 2049 -j ACCEPT | |
iptables -A INPUT -p udp --dport 2049 -j ACCEPT | |
iptables -A INPUT -p icmp -j ACCEPT | |
service iptables save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment