UFW (Uncomplicated Firewall) is a user-friendly frontend for managing netfilter firewall rules in Ubuntu. It provides a simple and easy-to-use interface to configure and manage firewall settings.
It is designed to be easy to use and understand, even for users who are new to firewall configuration. It allows users to easily enable or disable the firewall, allow or deny incoming connections, and configure various settings.
Some of the key features of UFW include:
- Simplified firewall configuration: UFW provides a simple and intuitive way to configure firewall rules.
- Default deny policy: UFW denies all incoming connections by default, and only allows outgoing connections.
- Allow and deny rules: Users can easily allow or deny incoming connections based on specific criteria, such as port numbers or IP addresses.
- Logging and monitoring: UFW provides logging and monitoring capabilities to help users track firewall activity.
- Integration with other Ubuntu tools: UFW is integrated with other Ubuntu tools, such as the Ubuntu Network Manager.
Some common UFW commands include:
To enable the firewall:
sudo ufw enable
To deny all incoming by default:
sudo ufw default deny incoming
To disable the firewall:
sudo ufw disable
To allow incoming connections on a specific port:
sudo ufw allow <port>
To deny incoming connections on a specific port:
sudo ufw deny <port>
To display the current firewall status:
sudo ufw status
To delete the current firewall rule:
sudo ufw delete <Rule Num>
To allow Webserver connections (Port 80 and Port 443):
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
To reload the firewall config:
sudo ufw reload