How to manage Plesk Firewall via CLI?

Follow

Comments

4 comments

  • Avatar
    Claudio Rifo

    Is there an official documentation page (Of this CLI tool)?

    The default rules (The ones included on install) always have the same IDs?

    Is there any way to see how the default rules are built (port/protocol)?

     

  • Avatar
    Alexandr Nikolaenko

    Hello Claudio,

    Let me answer your questions one by one.

    1. There is no official documentation of Plesk Firewall Management CLI as it was developed for internal usage. All documented CLI utilities are available at our Documentation Portal;
    2. ID's of Plesk default rules can be changed on activation/disabling Firewall management. "Priority" can be used as anchor if it is required, see point 3.
    3. Firewall rules are stored in "psa.module_firewall_rules" table. Default Plesk rules have values of "priority" in 0-20 range. At "object" the rule is written in service format, but nevertheless is understandable.
  • Avatar
    John Bertin

    When confirming  the changes, I get the following message; 

    "Applying and confirmation of firewall changes should be done via different ssh sessions."

  • Avatar
    Bato Tsydenov

    @John Bertin

    The message is self-explanatory: you should establish another SSH session to the server and confirm changes in the new SSH session.
    I have updated the article accordingly.

Please sign in to leave a comment.

Have more questions? Submit a request