UFW - Uncomplicated Firewall

Uncomplicated Firewall UFW is a much simpler security solution than using iptables, it is very easy to install and configure. iptables might ultimately have more features, but I think UFW is suitable for most users.
To install UFW from the command line:
sudo apt-get install ufw
To allow all ports on the local subnet:
sudo ufw allow from 192.168.0.0/24 (allow access from 192.168.0.1 - 192.168.0.254)
Allow web port 80 to everyone (internal and external LAN)
sudo ufw allow 80
To enable UFW and start rules:
sudo ufw –force enable