DenyHosts的白名單

修改 DenyHosts 的設定檔

vim /etc/denyhosts.conf

 

將 sshd 改為 ALL,監控所有服務

BLOCK_SERVICE  = sshd

 

建立一個白名單檔案,將信任IP寫進去(一行一行)

vim /var/lib/denyhosts/allowed-hosts

 

重新啟動

/etc/init.d/denyhosts stop

/etc/init.d/denyhosts start

 

記得檢查

/etc/hosts.deny 裡有沒有信任的IP,若有移除

查看 iptables 裡有沒有封索住信任的IP,若有修改iptables設定