Getting started with UFW (Uncomplicated Firewall) Ubuntu CLI

ubuntu blog 1

This is a quick reference guide about getting started with UFW (Uncomplicated Firewall) Ubuntu CLI

1.Check the status of the firewal

run the following commands to check the status of the firewall

IMPORTANT! Please see step 2 before enabling the firewall

2. Enabling ufw

2.1 CAUTION! Before enabling your firewall make sure that you have added a policy to allow SSH.

You can check this has been added in the following file:

2.2 ufw enable

3. Adding ufw rules

3.1 Basic ufw rule examples

The below rules will be from any source to a specific port on the local server.


3.2 Check ufw rules


3.3 Source and destination specific ufw rules



4. Delete ufw rules


Thank you for reading and please feel free to leave any feedback.

Leave A Comment

What’s happening in your mind about this post !

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