Skip to content

Understanding UFW Firewall Settings

The Uncomplicated Firewall (UFW) is a simple yet powerful firewall management tool for Linux systems. Let's delve deeper into the settings outlined:

Status

The status indicates whether UFW is currently active or not. When active, UFW is enforcing the defined firewall rules. If inactive, the system allows all connections as if no firewall rules were configured.

Logging

Logging in UFW determines how firewall events are recorded. Enabling logging provides visibility into firewall activity, allowing administrators to monitor and analyze incoming and outgoing traffic. The logging level can be adjusted to control the verbosity of log messages.

Default Policy

The default policy specifies the default action for packets that do not match any explicitly defined firewall rules. In this case: - Incoming traffic is denied by default. - Outgoing traffic is allowed by default. - Routed traffic (traffic forwarded by the system) is disabled by default.

New Profiles

New profiles specify how UFW handles incoming connections from new networks. The "skip" option means UFW will not prompt for approval when a new network is detected, effectively ignoring new profiles.

Current Rules

The table presents the existing firewall rules configured in UFW. Each rule consists of: - To: The destination port or service. - Action: Whether to allow or deny traffic matching the specified criteria. - From: The source of the incoming traffic, which can be an IP address, hostname, or network.

For example, the listed rules allow incoming traffic on ports 22 (SSH), 80 (HTTP), and 443 (HTTPS) from any source. Additionally, separate rules are specified for IPv6 traffic.

UFW Firewall Settings

Below are the current settings for UFW:

  • Status: Active
  • Logging: On (low)
  • Default Policy:
  • Incoming: Deny
  • Outgoing: Allow
  • Routed: Disabled
  • New Profiles: Skip

Current Rules

To Action From
22/tcp (OpenSSH) ALLOW IN Anywhere
22/tcp ALLOW IN Anywhere
80/tcp ALLOW IN Anywhere
443 ALLOW IN Anywhere
22/tcp (OpenSSH (v6)) ALLOW IN Anywhere (v6)
22/tcp (v6) ALLOW IN Anywhere (v6)
80/tcp (v6) ALLOW IN Anywhere (v6)
443 (v6) ALLOW IN Anywhere (v6)

These settings allow incoming traffic on ports 22 (SSH), 80 (HTTP), and 443 (HTTPS) from any source. Logging is enabled with a low level of verbosity.

By adhering to these firewall settings, you can enhance the security of your system by restricting incoming connections while allowing necessary outgoing traffic.