Set up firewall (iptables config through UFW)

sudo ufw allow 22
sudo ufw allow 80
sudo ufw allow 443
sudo ufw enable
sudo ufw status verbose

Command may disrupt existing ssh connections. Proceed with operation (y|n)?   y
Then you will get a message that Firewall is active and enabled on system startup.
To check the status of UFW:

sudo ufw status verbose

Add your comment