1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

How to update firewall with cron?

Discussion in 'Plesk for Linux - 8.x and Older' started by belvin, May 31, 2006.

  1. belvin

    belvin Guest

    How to update firewall with cron?

    I have access to a set of iptables rules that block spam originating from Asia.
    This set of rules is updated frequently and I would like my server firewall to use the updated data.

    Bringing the new rules on my server with cron is easy.

    I know Plesk's rules are stored in a database, but to implement its firewall, it seems that Plesk creates a script called firewall-active.sh

    If I open the script firewall-active.sh, inject my special anti-spam rules in it (via cron), then run the script (via cron), will this update my firewall properly?

    Is there any other shell command that needs to be done to refresh the iptables firewall, besides running the script firewall-active.sh ?

  2. Highland

    Highland Guest

    Could I suggest you use APF instead of the Plesk Firewall? Much easier to configure and it would be much easier for your script. All you would need to do is edit the /etc/apf/deny_hosts.rules file and then issue
    #apf -r