Mike2017
New Pleskian
Hello,
I recently migrated my VPS from Plesk 12 to Plesk Onyx (I am now running Plesk Onyx v17.0.17 update #21 on Ubuntu 14.04.5 LTS). I have a number of custom rules in iptables and, previously, I just had iptables-persistent installed - it was auto loading on reboot iptables stored in /etc/iptables/rules.v4 and /etc/iptables/rules.v6 files. Unfortunately, this doesn't seem to work any longer in Plesk Onyx: I installed iptables-persistent without problems but when I run iptables-save > /etc/iptables/rules.v4, I get the error message "-bash: /etc/iptables/rules.v4: No such file or directory".
As I have a shell script to update iptables (to block bad bots and some ip ranges), I decided not to waste my time and just added the shell script to crontab. Something like:
@reboot /var/www/vhosts/xyz.com/drop-bots.sh
This didn't work either even though I tried all possible variations of this:
@reboot bash /var/www/vhosts/xyz.com/drop-bots.sh
@reboot bash /home/var/www/vhosts/xyz.com/drop-bots.sh
...
Finally, I tried just to add the shell script to /etc/init.d/ and, obviously, I didn't forget to change permissions with chmod +x /etc/init.d/drop-bots.sh
Same result, iptables don't get updated after reboot...
Now, I'm totally puzzled as neither of these 3 solutions worked in Plesk 17
Needless to say, "bash /var/www/vhosts/xyz.com/drop-bots.sh" works fine from the command line and updates the iptables just as intended... Any thoughts/suggestions?
I recently migrated my VPS from Plesk 12 to Plesk Onyx (I am now running Plesk Onyx v17.0.17 update #21 on Ubuntu 14.04.5 LTS). I have a number of custom rules in iptables and, previously, I just had iptables-persistent installed - it was auto loading on reboot iptables stored in /etc/iptables/rules.v4 and /etc/iptables/rules.v6 files. Unfortunately, this doesn't seem to work any longer in Plesk Onyx: I installed iptables-persistent without problems but when I run iptables-save > /etc/iptables/rules.v4, I get the error message "-bash: /etc/iptables/rules.v4: No such file or directory".
As I have a shell script to update iptables (to block bad bots and some ip ranges), I decided not to waste my time and just added the shell script to crontab. Something like:
@reboot /var/www/vhosts/xyz.com/drop-bots.sh
This didn't work either even though I tried all possible variations of this:
@reboot bash /var/www/vhosts/xyz.com/drop-bots.sh
@reboot bash /home/var/www/vhosts/xyz.com/drop-bots.sh
...
Finally, I tried just to add the shell script to /etc/init.d/ and, obviously, I didn't forget to change permissions with chmod +x /etc/init.d/drop-bots.sh
Same result, iptables don't get updated after reboot...
Now, I'm totally puzzled as neither of these 3 solutions worked in Plesk 17
Needless to say, "bash /var/www/vhosts/xyz.com/drop-bots.sh" works fine from the command line and updates the iptables just as intended... Any thoughts/suggestions?