What is UFW (Uncomplicated Firewall) in Linux Mint
UFW (Uncomplicated Firewall) is an easy-to-use and dependable firewall interface that provides a command-line interface for interacting with the firewall. Furthermore, if you prefer not to use the command line, UFW provides several graphical user interface (GUI) features that make dealing with the system a breeze. So to install UFW using a terminal, you need to type:
After its installation, you can verify if UFW is enabled or not by typing.
There are two possibilities when you execute this command on the terminal; either you will get the active status or inactive status:
As you can see, the UFW is active and running; the next step is to allow any application or a port with this firewall.
How to open firewall ports on Linux Mint
Many utilities in Linux use ports for communication and SSH is one of them. If you want to open the port of the OpenSSH for incoming and outgoing communication, you need to type:
The firewall may block the communication because of the port permission and if you are interested in opening the port for this purpose, then you can type:
22 is the port used by SSH, you can verify if these rules have been implemented or not by typing again.
You can also stop or disable any specific port for communication, and for that, you can type.
And after the verification, you will get the status mentioned below.
Conclusion
A firewall secures a network by monitoring incoming and outgoing data packets, allowing, or blocking them based on security rules. According to a set of security rules, firewalls monitor inbound and outbound network traffic and decide whether or not to allow data packets. This article shows you how you can open any specific port for communication using the UFW firewall in Linux Mint.