Linux mint firewall настройка

How to Install and Setup UFW on Linux Mint 21

Uncomplicated Firewall (UFW) is the widely used and easiest command-line tool for handling the network. It is designed specifically for easy firewall configuration through simple commands that run on the terminal. These rules may include the configuration of ports, IPs, and incoming and outgoing connections like allowing and blocking them.

This firewall is not powerful as compared to iptables, but a good start for beginners who are less familiar with firewall concepts. Also, it has a graphical interface to manage firewalls and can be launched using gufw command.

Install and Setup UFW on Linux Mint 21

Here’s a step-by-step guide to show how to set-up UFW on Linux Mint 21 system:

Step 1: Upgrade the system repository to refresh all packages; this would avoid any conflict in the further process:

Step 2: For firewall configuration, you should have sudo privileges. Confirm with the help of the command if you’re working as the root user:

Step 3: Firewall is pre-installed in all Linux distributions and in case it is deleted or you don’t find it, type the command to install it on your system:

Step 4: Immediately enable the Firewall service using the mentioned command:

Step 5: Confirm the UFW status from the following command to check whether it is running successfully on your system:

Читайте также:  Vbox shared folders to linux

Step 6: In the next move, you must enable the Firewall by yourself through the following command:

The above command activates the firewall setting on your Linux Mint system.

Display UFW Applications Profiles

To display all the present applications supported by firewall, type:

Let’s apply the rule to any of the above-mentioned applications; like to enable both HTTP and HTTPS server; type the following command:

The same command applies for other applications as well in case you want to apply rules on these applications.

Set Firewall Policies

The firewall has set the default policies by allowing the outgoing connections and denying the incoming connections for security purpose. In case if you want to set it by yourself, you can change the policies anytime.

For denying the incoming connections, you should apply the following command:

For allowing the outgoing connections, you must use the following command:

Enable Firewall on SSH Connections

You can also enable firewall on SSH connections to improve the system security and for this, you will require executing the following command:

Check UFW Status

You can display the status of all the applied rules on the firewall by executing the following command:

You can use the verbose flag command given below to display a detailed status update:

You can also view firewall status updates in a numeric sequence through the following command:

Setup UFW Firewall Through GUI

The UFW can also be configured using GUI and for this, you will require installing a tool called “gufw” on Linux Mint 21 system from the following command:

After the installation, launch it on the terminal by typing the command “gufw” and this command requires authentication to ensure you’re working as a root user:

Читайте также:  Ibm lotus astra linux

Once you enter the correct credentials (password); the firewall screen will open in front of you and you can set the rules according to your choice:

This completes the setup of Firewall on Linux Mint system.

Conclusion

UFW is a popular and easy frontend tool to manage a Netfilter Firewall in a Linux system. Its aim is to make firewall configuration easier for beginners. This guide has mentioned all the necessary details of setting up UFW through different commands and GUI tools. It depends on the user’s choice of which method they want to adopt because both can be used to setup a firewall on Linux Mint system.

About the author

Syeda Wardah Batool

I am a Software Engineer Graduate and Self Motivated Linux writer. I also love to read latest Linux books. Moreover, in my free time, i love to read books on Personal development.

Источник

How to open a firewall on Linux Mint

firewall on linux mint

A firewall protects a network by permitting or stopping data packets depending on security criteria. An effective firewall examines incoming traffic according to predefined criteria and prevents attacks by filtering questionable or unprotected data. Firewalls safeguard computer traffic at ports, where peripheral devices exchange data with a computer.

By deploying firewalls, you may prevent unwanted traffic from accessing your internal network perimeter from malicious sources, such as viruses and hackers. Therefore, this post will define a UFW firewall and demonstrate how to open a firewall port on Linux Mint.

What is Linux Mint’s UFW (Uncomplicated Firewall)?

UFW (Uncomplicated Firewall) is a straightforward and trustworthy firewall interface that includes a command-line interface for dealing with the firewall. UFW has several graphical user interface (GUI) tools that simplify system administration if you opt not to use the command-line interface. Thus, to install UFW through a terminal, you must type the command below:

Читайте также:  Linux security test tools

Install UFW

After it is installed, you can verify to see if UFW is has been enabled or not by running the command below:

sudo systemctl status ufw

When you run the command above on the terminal, you will receive the active or inactive status.

ufw active inactive status

UFW active/inactive status

As you’ve seen, the UFW is operational and functioning; the next phase is to configure the firewall to accept any application or port.

How to configure Linux Mint’s firewall to allow ports

Numerous tools in Linux communicate over ports, and SSH is among them. To open the OpenSSH port for outgoing and incoming communication, type this command:

allow port

The firewall may prohibit communication due to port permissions, and if you wish to open the port for this cause, type this command:

Note: By typing 22 again, you can see if these rules have indeed been implemented or not.

ufw status

You can stop or disable any specific communication port by executing the command below:

disable port

And upon verification, you will receive the following status.

ufw status

How to reset UFW

If you make an error, you can disable and revert the firewall to its default settings.

Conclusion

A firewall protects a network by examining incoming and outgoing data packets and allowing or blocking them per security policies. Firewalls monitor inbound and outgoing network packets and decide whether or not to admit data packets based on a set of security criteria. This article explains how to use the UFW firewall in Linux Mint to open any specified port for communication.

Источник

Оцените статью
Adblock
detector