How to Configure UFW Firewall on Debian to Secure Your Server
UFW (Uncomplicated Firewall) is a straightforward tool for hardening a Linux server by blocking all incoming connections except those explicitly permitted. The setup involves installing UFW on Debian, setting default policies to deny all incoming and allow all outgoing traffic, then allowlisting SSH, HTTP (port 80), and HTTPS (port 443) before activating the firewall. The critical step is allowing SSH access before enabling UFW to avoid locking yourself out of the server. Once activated, UFW runs automatically on system startup and supports both IPv4 and IPv6 rules. Users are advised to verify connectivity from a second SSH session before closing the original, and can recover from a lockout using a VNC console if needed.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in