UFW - Uncomplicated Firewall Basic Setup

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.
This page shows how to install UFW and how to create some rules. The result of these settings is that your firewall will allow all traffic on your local LAN, but will only let incoming traffic from the internet on port 80 (this is because I want to host a website).
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