• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Is it possible to make changes to Plesk Firewall from the command line?

HHawk

Regular Pleskian
Hi all,

I am trying to learn how to setup a server from the command line, instead of by using the Plesk control panel.
So far, I can manage everything from the command line. Which will be a time-saver, except for one thing; the Plesk Firewall.

Is it possible to make visible changes in there as well? For example I want to enable the Plesk Firewall from the command line and add a Passive Port (49152-65534) rule as well to it.

I cannot seem to find any information on how to do this through SSH / command line...

Please advice. Thanks.
 
Thanks IgorG...

Weird, I couldn't find that KB at all yesterday. I did actually search for it. Maybe I used the wrong search terms.
Anyways thank you!
 
Sometimes old articles get replaced by more detailed, better articles. There is a new article on this topic. Does the section "Managing firewall rules via a command-line interface" in
deliver what you are seeking?
Unfortunately not.
but I found in the meantime a workable solution with /usr/local/psa/bin/modules/firewall/settings. There one can se the entries with multiple IP's. That all I need, as I can do the confirmation in Plesk then.

I will document my way as soon as Im done.
For those who need urgent solution simply SSH to your system and enter
/usr/local/psa/bin/modules/firewall/settings --help.
(Just be carefull there are some errorsin the description, as the --set-rule command is not positional und comma separated, but just whitespace separated and non-positional.
For updates of rules the id-Parameter can be located in the Firewall-URL in Plesk.

I will not use the --apply and --confirm commands but check my entries in Plesk and do the apply in Plesk (as my issue was just to avoid entering tens of IP's manually.
BTW: this is the link which brought me onto this track
https://www.plesk.com/kb/support/how-to-manage-local-firewall-rules-using-plesk-firewall-in-plesk-for-linux/
 
Back
Top