Posted on Sunday March 13, 2016 by Eric Potvin
Ubuntu has simple firewall you can install. UFW (Uncomplicated Firewall) is a basic firewall that works very well and easy to configure with its Firewall configuration tool.
To install UFW and enable it, simply execute this command:
sudo apt-get install ufw
Allow SSH and Http services.
sudo ufw allow ssh sudo ufw allow http sudo ufw deny 23 sudo ufw default deny
Enable the firewall.
sudo ufw enable
Check the status of the firewall.
sudo ufw status verbose
You can see all the changes in the IPTables config:
sudo iptables -L