step 1: apt install ufw
step 2: ufw enable
step 3: sudo nano /etc/default/ufw
#enable ipv6=yes
step 4: Added default deny of incoming and allow outgoing
sudo ufw default deny incoming
sudo ufw default allow outgoing
#. to see the list
sudo ufw app list
step 5: #. Allow open ssh for all your login and other operations
sudo ufw allow OpenSSH
sudo ufw allow ssh
sudo ufw allow 22
sudo ufw show added
sudo ufw enable
step 6: #. Allow default web ports and custom ports
sudo ufw allow http
sudo ufw allow https
sudo ufw allow 8099
sudo ufw allow 88
#. To see the port list
sudo ufw status verbose
#. To deny the ports
sudo ufw deny <port>
Thank You
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-18-04
No comments:
Post a Comment