ufw – Uncomplicated Firewall

ufw (Uncomplicated Firewall) is a user-friendly frontend for iptables that simplifies firewall management on Linux....

Networking Tools Linux Open Source

ufw (Uncomplicated Firewall) is a user-friendly frontend for iptables that simplifies firewall management on Linux. Developed by Ubuntu, it provides an intuitive command-line interface for creating and managing firewall rules without needing to understand complex iptables syntax.

Key Features

  • Simple Syntax – Human-readable commands
  • Application Profiles – Pre-configured rules for common services
  • IPv6 Support – Manages both IPv4 and IPv6 rules
  • Logging – Built-in logging capabilities

Installation

sudo apt install ufw    # Debian/Ubuntu
sudo dnf install ufw    # Fedora

Basic Usage

# Enable firewall
sudo ufw enable

# Allow SSH
sudo ufw allow ssh
sudo ufw allow 22/tcp

# Allow specific port
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

# Deny port
sudo ufw deny 23

# Check status
sudo ufw status verbose

# Delete rule
sudo ufw delete allow 80

# Reset to defaults
sudo ufw reset

View Documentation

Was this article helpful?