Last active
July 26, 2019 20:53
-
-
Save antoniomerlin/22f218ae10ae3a6a3de63db2f2cd960e to your computer and use it in GitHub Desktop.
ufw cheatsheet
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
Installation | |
sudo apt install ufw | |
GUI version | |
sudo apt install gufw | |
Enable firewall | |
sudo ufw enable | |
Check rules & status | |
sudo ufw status | |
sudo ufw status verbose | |
Allow applications | |
sudo ufw allow ssh # Allow SSH port 22 | |
sudo ufw allow http # Allow web server port 80 | |
sudo ufw allow https # Allow web server port 443 | |
sudo ufw allow 4444 # Allow port 6565 | |
sudo ufw allow 4444/tcp # Allow port 6565 TCP only | |
sudo ufw allow 4444/udp # Allow port 6565 UDP only | |
sudo ufw allow 1714:1764/udp # Allow Port From 1714 to 1764 UDP | |
sudo ufw allow 1714:1764/udp # Allow Port From 1714 to 1764 TCP | |
Remove allowed applications | |
sudo ufw delete allow tcp # Remove Allow TCP Entry | |
Reload firewall | |
sudo ufw reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment