UFW Firewall

I set UFW to block all incoming traffic except SSH, HTTP and HTTPS and tested it from a client.

Overview

I configured UFW on Ubuntu Server to block incoming traffic by default and allow only SSH, HTTP and HTTPS. I tested the rules from an Alpine Linux client.

What I set out to do

  • Allow only the services the server needs.

What I did

  • I enabled UFW with a default deny for incoming traffic and allow rules for SSH, HTTP and HTTPS.

Screenshots

They are in the same order as in my repository. Click one to see it full size.

How I tested it

  • Port 8080 was blocked. After I added a temporary allow rule it became reachable.

Repository

My full notes and the original screenshots are on GitHub: linux-projects/09-ufw-firewall