×

This article covers how to define a new UFW rule for limiting SSH access on your Linux Mint 20 system. In fact, UFW, short for "uncomplicated firewall", is a frontend for the more complex iptables utility. It's designed to make managing a firewall as simple as setting ports to be open and closed, and regulating what traffic is allowed to go through.


How to install UFW on Ubuntu / Debian ?

UFW is installed by default in Ubuntu, but if it's not you can install it from apt:

$ sudo apt-get install ufw

If you're running another distro, you'll have to use that distro's package manager, but UFW is widely available. You can check the status of the firewall with:

$ sudo ufw status



This article covers how to set up UFW on Ubuntu 18.04 system. It advised to deny all the incoming connections except necessary ports. Uncomplicated Firewall or UFW is an interface to iptables that is designed to simplify the process of configuring a firewall. While iptables is a firm and flexible tool, it can be sometimes tricky for beginners to learn how to use it to properly configure a firewall. If a user is looking to get started securing his or her network, UFW may be the appropriate solution.


UFW is installed on Ubuntu by default. If it has been uninstalled for some reason, we can install it with the following command:

$ sudo apt install ufw

By default, UFW denies all incoming connections and allows all outgoing connections. It means that a client trying to reach our server would not be able to connect. When an application from our server tries to connect any other server outside, it will be allowed. The following commands serve the purpose:

$ sudo ufw default deny incoming
$ sudo ufw default allow outgoing




More Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on IbmiMedia.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com