Last active
August 16, 2020 11:18
-
-
Save sonuame/42a68a85c60315b52204d0dfd98102de to your computer and use it in GitHub Desktop.
This file contains 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
sudo apt-get install iptables-persistent | |
sudo iptables -A OUTPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 1433 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 9000 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT | |
sudo netfilter-persistent save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment