SecurityFirewall
UFW
Uncomplicated Firewall (UFW) configuration and management
# Install UFW if not installed
sudo apt install ufw
# Set default policies
sudo ufw default deny incoming
sudo ufw default allow outgoing
# Allow HTTP and HTTPS to everyone
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
# Enable UFW (careful! test first!)
sudo ufw enable
# Check current rules
sudo ufw status numberedStandard UFW rules when SSH-ing into the server with Tailscale. This will only allow web traffic into the server.