Created
January 27, 2017 05:08
-
-
Save Fabricio20/e4dc5f6b476357dc8da851858ad1d103 to your computer and use it in GitHub Desktop.
UFW "fix" for anything, used over ssh
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
iptables -F | |
iptables -X | |
iptables -t nat -F | |
iptables -t nat -X | |
iptables -t mangle -F | |
iptables -t mangle -X | |
iptables -P INPUT ACCEPT | |
iptables -P FORWARD ACCEPT | |
iptables -P OUTPUT ACCEPT | |
sudo ufw disable | |
sudo ufw reset | |
iptables -F | |
iptables -X | |
iptables -t nat -F | |
iptables -t nat -X | |
iptables -t mangle -F | |
iptables -t mangle -X | |
iptables -P INPUT ACCEPT | |
iptables -P FORWARD ACCEPT | |
iptables -P OUTPUT ACCEPT | |
sudo ufw default deny incoming | |
sudo ufw default deny outbound | |
sudo ufw allow 22/tcp | |
sudo ufw enable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment