Setup Basic Firewall

You can setup a secure basic firewall using the "Uncomplicated Firewall or UFW".

then

click status to "on". This will setup a deny all incoming and allow all outgoing firewall.

Alternatively, you can

This method will deny all incoming connections and allow outgoing but also deny ssh connections to further protect your system.

Note: if you require ssh connections then of course do not block it, if you are not sure what ssh (Secure Shell) is, then block it as it will make the system more secure.

For both methods make sure you copy, open /etc/rc.d/rc.local with your favourite editor (for example vi):

and paste the following into it. This will allow the firewall to start with each boot.

If you want to check the status of your firewall at any time