denyhosts keeps adding back my IP

前端 未结 9 1213
Happy的楠姐
Happy的楠姐 2021-01-30 11:39

I am trying to unblock an IP from which I was doing some tests. I have followed the tutorials on the net:

$ sudo /etc/init.d/denyhosts stop
$ sudo vim /etc/deny.         


        
9条回答
  •  隐瞒了意图╮
    2021-01-30 11:53

    Adding to an old question, but on Debian Wheezy removing the IP entries did not help: within seconds of running "service denyhost start" the IP would be re-added to hosts.deny and all the files in /var/lib/denyhosts/. It turns out that DenyHosts was re-scanning /var/log/auth.log which included the failed login attempts.

    After removing the IP entry from the files listed above, before you restart denyhosts, force auth.log to be archived by running (as root):

    logrotate -vf /etc/logrotate.d/rsyslog
    

    Double-check that /var/log/auth.log is empty, then restart denyhosts.

提交回复
热议问题