Add custom rules to the Plesk firewall

Plesk has a (somewhat annoying) default firewall configuration that you can adjust from within the Plesk interface. However, if you want to add additional rules, you may find that you can't add the rules you want from the interface. If you add them from the command line, Plesk will overwrite them when it feels the urge, even if you run service iptables save as you're supposed to.

You can override this by making /etc/sysconfig/iptables immutable with chattr. Just run the following:

# chattr +i /etc/sysconfig/iptables

Now, Plesk can't adjust your iptables rules without your intervention. Well, that is until SWSoft figures out how to run chattr when Plesk can't edit certain configuration files. :-)

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Printed from: http://rackerhacker.com/2007/08/02/add-custom-rules-to-the-plesk-firewall/ .
© Major Hayden 2010.

1 Comment   »

  • I don't think this approach will work if you also want to use the Plesk interface?

    The issue I have is that some clients use the Plesk firewall interface but I still need to add custom rules.

    Thus far, I've not found a good way to handle this. I peaked into the plesk database and I've little clue how they right their rules.

    The only method I've come up with was to create a custom chain and have a script to assure it is in as rule #1.

RSS feed for comments on this post , TrackBack URI

Leave a Reply