Remove ip from hosts.deny

Posted lotus-white

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Remove ip from hosts.deny相关的知识,希望对你有一定的参考价值。

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

Stop DenyHosts

# services denyhosts stop

Remove the IP address from /etc/hosts.deny

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

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

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

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

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

Start DenyHosts

# services denyhosts start

 

以上是关于Remove ip from hosts.deny的主要内容,如果未能解决你的问题,请参考以下文章

如何修改被hosts.deny禁止访问的IP

通过配置hosts.allow和hosts.deny文件允许或禁止ssh或telnet操作

hosts.allow hosts.deny

hosts.deny

通过配置hosts.allow和hosts.deny文件允许或禁止ssh或telnet操作

Linux服务器允许和限制访问