Technohelp

Linux OS

Firewall rules using ufw

Using the firewall port config software available for certain linux distributions


Updated at: 2024-05-31 12:07:37 (Author: Admin User)

Install ufw firewall software on Debian based linux distributions such as Ubuntu, Linux Mint, etc.

$ sudo apt install ufw

Enable ufw after installation

$ sudo ufw enable

Allow http:

$ sudo ufw allow 80

Allow https:

$ sudo ufw allow 443

Allow ssh on tcp protocol only

$ sudo ufw allow 22/tcp