CentOS如何移除被hostsdeny限制访问的IP地址 发表于 2018-05-15 更新于 2021-11-29 分类于 centos 阅读次数: Step # 1: Stop DenyHosts1# /etc/init.d/denyhosts stop Step # 2: Remove Your IP From /etc/hosts.deny1# vi /etc/hosts.deny Delete your IP address. Save and close the file. Step # 3: Remove Your IP From /usr/share/denyhosts/data Directory12# cd /var/lib/denyhosts# cd /usr/share/denyhosts/data You need to edit the following files using vi and remove the lines containing the IP address. Save the file. 12345hostshosts-restrictedhosts-roothosts-validusers-hosts If you’ve static IP address add to allowed-hosts file. Any IP address that appears in this file will not be blocked by default (consider this as a whilelist): 1# echo '1.2.3.4' >> allowed-hosts Step # 4: Start DenyHosts1# /etc/init.d/denyhosts start