denyhosts keeps adding back my IP

前端 未结 9 1220
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:01

    This worked for me on Centos. Follow the 8 steps below and you should be good to go.

    1. Stop DenyHosts

      # services denyhosts stop

    2. Remove the IP address from /etc/hosts.deny

    3. Edit /var/lib/denyhosts/hosts and remove the lines containing the IP address. Save the file.

    4. Edit /var/lib/denyhosts/hosts-restricted and remove the lines containing the IP address. Save the file.

    5. Edit /var/lib/denyhosts/hosts-root and remove the lines containing the IP address. Save the file.

    6. Edit /var/lib/denyhosts/hosts-valid and remove the lines containing the IP address. Save the file.

    7. Edit /var/lib/denyhosts/users-hosts and remove the lines containing the IP address. Save the file.

    (optional) Consider adding the IP address to /var/lib/denyhosts/allowed-hosts

    1. Start DenyHosts

      # services denyhosts start

提交回复
热议问题