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.
1. UFW Firewall Status & RulesShows UFW active with SSH, HTTP and HTTPS traffic allowed. 2. UFW Port TestShows port 8080 being blocked by UFW and subsequently reachable after a temporary allow rule was applied.
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