• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question Question How to allow custom iptables rules in Plesk Obsidian?

danimora

Basic Pleskian
Server operating system version
CentOS Linux 7.9.2009 (Core)
Plesk version and microupdate number
Plesk Obsidian Version 18.0.52 Update #3
I need to make a custop iptables rule persistent so that I can enable our docker containers to access Internet.

This is the rule:

iptables -t nat -A POSTROUTING -s 172.17.0.0/16 -o eth0 -j MASQUERADE

But this rule is lost everytime I make a change using the Plesk Firewall GUI.

How can I make this rule persistent? I've seen post talking about iptables-persistent but that might not apply to Obsidian.

What is the right way to add custom rules?
 
Sorry, you're right. I completely missed those rule settings in your OP. Interesting conundrum ... I don't have any suggestions at moment on how to go about this. Maybe someone else has a suggestion ..
 
Does this page help?

Thank you for the suggestion. This technique looks cool but I'm afraid that if I persist the iptables rules and restore them this would certainly overwrite the iptables rules generated by Plesk.

The Plesk firewall creates a .sh file that rewrites all the iptables config each time it is applied (/usr/local/psa/var/modules/firewall/firewall-active.sh)
 
My suggestion is to copy the current rules generated by Plesk then turn off/disable the Plesk firewall, then manually apply the rules with your custom rules following the instructions provided by Peter. This does mean that you will not be able to use the Plesk firewall extension but you will have greater control over the firewall.
 
My suggestion is to copy the current rules generated by Plesk then turn off/disable the Plesk firewall, then manually apply the rules with your custom rules following the instructions provided by Peter. This does mean that you will not be able to use the Plesk firewall extension but you will have greater control over the firewall.

Yes, I finally realized that it cannot be done if the Plesk Firewall is enabled. The way you suggest the best one. However I ended up doing it with a cron script because I like to keep all my Plesk servers with a the same manegement procedures.

Thanks!
 
Yes, I finally realized that it cannot be done if the Plesk Firewall is enabled. The way you suggest the best one. However I ended up doing it with a cron script because I like to keep all my Plesk servers with a the same manegement procedures.

Thanks!
Can you please share your solution? I have the same issue and like your aproach.
 
Back
Top