How to set Fail2ban Daemon start as last after server rebooting?

Created:

2016-11-16 12:50:31 UTC

Modified:

2017-04-24 12:10:01 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to set Fail2ban Daemon start as last after server rebooting?

Applicable to:

  • Plesk 12.5 for Linux

Question

How to set Fail2ban Daemon start as last after server rebooting?

Answer

Change execution order of init scripst for fail2ban service.

  1. Select starting scripts in /etc/rc* directories

    # find /etc/rc -name fail2ban /etc/rc0.d/K20fail2ban /etc/rc1.d/K20fail2ban /etc/rc2.d/S20fail2ban /etc/rc3.d/S20fail2ban /etc/rc4.d/S20fail2ban /etc/rc5.d/S20fail2ban /etc/rc6.d/K20fail2ban

  2. Review and find maximum number of initscripts(e.g. S98some_process_to_start) scripts and rename them as follows:

    # mv /etc/rc2.d/S20fail2ban /etc/rc2.d/S99fail2ban
    # mv /etc/rc3.d/S20fail2ban /etc/rc3.d/S99fail2ban
    # mv /etc/rc4.d/S20fail2ban /etc/rc4.d/S99fail2ban
    # mv /etc/rc5.d/S20fail2ban /etc/rc5.d/S99fail2ban

Check An introduction to services, runlevels, and rc.d scripts article for more information

Have more questions? Submit a request
Please sign in to leave a comment.