UFW – Firewall on Ubuntu

A brief description of the setting for ufw firewall (firewall) on Ubuntu

Description

Base Firewall (firewall, it is also a firewall or tracing paper from English – firewall) in Linux, not only in Ubuntu, is called iptables

The standard management interface of this firewall is the utility netfilter… iptables and netfilter are closely related to each other, which is often combined into a single whole netfilter / iptables

In this work, you will use a firewall configuration tool called UFW (from the phrase Uncomplicated Firewall). For simplicity, we will call ufw a firewall, although in fact it is just an interface for interacting with neftilter / iptables.

Initial ufw setup

Allow ufw SSH access:

We activate the firewall:

Check the status of allowed connections:

Should be:

Status: active

To Action From
—— —-
OpenSSH ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)

The firewall will now block all connections except SSH. In order not to make life difficult for yourself, you must remember that the Firewall was turned on and if some ports do not work, this may be due to the blocking of our firewall.

Useful commands

Adding rules

Add Rule:

sudo ufw allow 11211/tcp # memcached

Removing rules

Show current rules numbered:

Remove rule n:

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *