• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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

danim

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