Firewall Setup on Ubuntu: Secure Your Server with UFW

Protect your Ubuntu server from unwanted traffic by setting up a firewall with UFW — the Uncomplicated Firewall. In this beginner-friendly guide, you’ll learn how to allow only connections — like SSH (port 22), HTTP (port 80), and HTTPS (port 443) — while blocking everything else. Whether you're hosting your website on a VPS or a local server, securing it with a firewall is an essential step you can complete in just minutes. ⏩ Watch next (SSH security):    • Secure SSH Key Login on Ubuntu: No Root, N...   ⏪ Watch previous (domain + SSL):    • Domain + Free SSL on Your VPS: Complete Se...   📺 Full Playlist – Deploy & Secure Your VPS Website:    • Deploy & Secure Your VPS Website 🚀 Complet...   What You’ll Learn ✅ Install and enable UFW ✅ Allow SSH, HTTP, and HTTPS traffic ✅ Block all other unwanted traffic automatically ✅ Verify firewall rules works ⏱️ Chapters 00:00 Why a firewall is important 00:20 Demo open port with netcat 01:03 Install UFW 01:29 Allow SSH 02:31 Enable the firewall 03:28 Allow HTTP and HTTPS 04:37 Verify blocked port