All Guides
UFW Firewall Setup
Secure your server with Ubuntu Uncomplicated Firewall (UFW).
Beginner10 min
Setup Steps
1. Install UFW (usually pre-installed on Ubuntu):
sudo apt install ufw -y2. Set default policies:
sudo ufw default deny incoming
sudo ufw default allow outgoing3. Allow SSH access (IMPORTANT - do this first!):
sudo ufw allow ssh
# or if using a custom port:
sudo ufw allow 2222/tcp4. Allow web traffic:
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp5. Enable UFW:
sudo ufw enable6. Check status:
sudo ufw status verbose7. Allow access from a specific IP:
sudo ufw allow from 192.168.1.100 to any port 33068. Delete a rule:
sudo ufw status numbered
sudo ufw delete 59. Reset all rules:
sudo ufw reset10. Check UFW logs:
sudo ufw logging on
sudo tail -f /var/log/ufw.logRelated Guides
Fail2Ban Setup
Protect your server against brute-force attacks with Fail2Ban.
VPN Setup (WireGuard)
Set up a WireGuard VPN server and configure clients.
ModSecurity WAF Setup
Install ModSecurity Web Application Firewall with Apache or Nginx.
Certbot Automatic SSL Renewal
Configure automatic renewal of Let's Encrypt SSL certificates with Certbot.