• 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.

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