← Volver al blog

How to Enable Firewall (UFW) in Ubuntu

  • Xernode
  • 1 min de lectura
  • 19 de marzo de 2026
Linux firewall ufw security linux ubuntu

Introduction:
Enabling the firewall in Ubuntu with UFW (Uncomplicated Firewall) is a simple way to protect your server from unwanted access.

Step-by-step Guide:

  1. Install UFW (if not already installed):n
    • sudo apt update
    • sudo apt install ufw
  2. Enable UFW:n
    • sudo ufw enable
  3. Allow SSH (so you don’t get locked out):n
    • sudo ufw allow ssh
  4. Check UFW status:n
    • sudo ufw status
  5. Allow other ports as needed (example for HTTP):n
    • sudo ufw allow 80/tcp

Recommendations:

  • Only allow necessary ports.
  • Regularly check firewall status for security.

Call To Action:
Need a secure VPS for Ubuntu? Try our plans now! https://xernode.com/#pricing

Related Guides