denyhosts keeps adding back my IP

前端 未结 9 1231
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 12:10

    Here's what worked for me on CentOS 6.7

    1. Stop DenyHosts (ver 2.6) ./daemon-control stop
    2. Remove line/s with your/target IP address from /etc/hosts.deny
    3. Remove line/s with your/target IP address from /usr/share/denyhosts/data/hosts
    4. Remove line/s with your/target IP address from /usr/share/denyhosts/data/hosts-restricted
    5. Remove line/s with your/target IP address from /usr/share/denyhosts/data/hosts-root
    6. Remove line/s with your/target IP address from /usr/share/denyhosts/data/hosts-valid
    7. Remove line/s with your/target IP address from /usr/share/denyhosts/data/users-hosts
    8. ADD your/target IP address to /usr/share/denyhosts/data/allowed-hosts. This file simply expects one IP per line. Any IP address that appears in this file will not be blocked.
    9. Start DenyHosts ./daemon-control start

提交回复
热议问题