Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I configure cron for DenyHosts use?

configure cron DenyHosts
0
Posted

How do I configure cron for DenyHosts use?

0

Presumably, you will need to run DenyHosts as root (in order for DenyHosts to update /etc/hosts.deny and read entries from /var/log), so you first must become root. Once you have either logged in as root (or used su – root, for instance) you can then run the following command: # crontab -e The above command will launch the crontab editor. To launch DenyHosts every 20 minutes you would then add the following line to the crontab: 0,20,40 * * * * python PATH_TO_DENYHOSTS/denyhosts.py -c PATH_TO_DENYHOSTS_CONFIG/denyhosts.cfg You will need to substitute your site-specific paths above. As an example, if you installed DenyHosts in /usr/local/etc and maintain your configuration file there as well, then the following crontab entry would be appropriate: 0,20,40 * * * * python /usr/local/etc/denyhosts/denyhosts.py -c /usr/local/etc/denyhosts/denyhosts.cfg Once you have edited the crontab you should then save it. Assuming you didn’t make any errors, the crontab will automatically install itself.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.