Bobcares

Manage local firewall rules using Plesk Firewall | Tips

by | Jan 7, 2022

Manage local firewall rules using Plesk Firewall with this handy guide from Bobcares.

At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Service.

Let’s take a look at how our Support Team recently helped out a customer manage firewall rules via Plesk Firewall.

How to manage local firewall rules using Plesk Firewall

If you are looking for a way to manage the local firewall rules via the Plesk Firewall, you are in the right place. Our Support Techs are here with an easy guide to help you out.

However, before we start with the procedure, we have to ensure that we disable firewalld via SSH before enabling Plesk Firewall. We can do this with the following command:

# systemctl stop firewalld && systemctl disable firewalld

We have to enable Plesk Firewall by clicking Enable under Enable Firewall Rules Management in the Firewall section under Tools& Settings.

In case we are using a custom SSH port, we have to add a rule for the custom SSH port in order to permit SSH connections.

We can add, remove, or modify firewall rules by clicking Modify Plesk Firewall Rules:

Manage local firewall rules using Plesk Firewall : Modify Plesk Firewall Rules

For instance, suppose we want to add a rule to permit connections to custom SSH port 2222:

  1. First, we will click Add Custom Rule.

    Manage local firewall rules using Plesk Firewall : Add Custom Rule

  2. Next, we will fill the following fields and click OK:
      • Name of the rule: Custom SSH port
      • Match direction: Incoming
      • Ports: TCP 2222
      • Action: Allow
      • Sources: Specify from which IP addresses SSH connections are allowed. Here, SSH we will allow connections to custom port from 203.0.113.2.

    Manage local firewall rules using Plesk Firewall : Custom Rule

  3. Then, we will click Apply Changes.

How to manage local firewall rules using Plesk Firewall via CLI

According to our Support Techs, we can also use the /usr/local/psa/bin/modules/firewall/settings utility in order to manage Plesk Firewall in a CLI.

We can access a complete list of available options with this command:

# /usr/local/psa/bin/modules/firewall/settings –help

Here is an example of how to get this done:

  1. First, we will connect to the Plesk server via SSL in two separate SSH windows.
  2. Then in SSH windows A, we will enable the firewall with this command:
    # /usr/local/psa/bin/modules/firewall/settings -e
  3. Next, we will confirm the changes within sixty seconds in SSH window B with this command:
    # /usr/local/psa/bin/modules/firewall/settings –confirm

[Looking for a solution to another query? We are just a click away.]

Conclusion

In brief, the skilled Support Engineers at Bobcares demonstrated how to manage firewall rules via Plesk Firewall.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

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

Never again lose customers to poor
server speed! Let us help you.