Skip to content

Instantly share code, notes, and snippets.

@reanim8ed
Last active March 27, 2022 19:00
Show Gist options
  • Save reanim8ed/469a4fdc86f497b1fb8f742d5dff2eef to your computer and use it in GitHub Desktop.
Save reanim8ed/469a4fdc86f497b1fb8f742d5dff2eef to your computer and use it in GitHub Desktop.
[UFW Firewall] #firewall #linux

New setup

  • sudo apt-get install ufw
  • sudo ufw allow ssh
  • sudo ufw allow 'Nginx Full'
  • sudo ufw enable - Ensure you have ssh above otherwise you will lose your connection and not get it back.

List rules

  • sudo ufw status numbered

Delete

  • sudo ufw delete 3

Allow access

  • Any IP: sudo ufw allow 3306/tcp
  • Specific IP: sudo ufw allow from 10.8.0.5 to any port 3306
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment