Description: UFW is a host-side Iptables class firewall Configuration tool that makes Linux firewalls easier to use and manage.
How to use:
1. Install the firewall
sudo apt-get install UFW (ubuntu kylin 14.04 lts default installation)
2. View firewall status
sudo UFW status
3. Enable the firewall
sudo ufw enable (turn on the firewall and boot from the boot)
sudo ufw default deny (turns off all external access to this machine, native access is normal externally)
4. Turn off the firewall
sudo ufw disable
5. Enable/Disable the appropriate port or service example
sudo UFW allow 80 (allows external access to port 80)
sudo ufw delete Allow 80 (disallow external access to port 80)
sudo ufw allow from 192.168.1.1 (allows this IP to access all native ports)
sudo UFW deny SMTP (prohibit external access to the SMTP service)
sudo UFW allow SMTP (allows external access to the SMTP service)
sudo ufw deny Proto TCP from 10.0.0.0/8 to 192.168.0.1 Port 22 (denies all TCP traffic from 10.0.0.0/8 to 192.168.0.1 address of 22 port)
6. Recommended settings
sudo UFW enable
sudo ufw default deny
UFW Simple to use