d-goo supercelldinger

コンピュータ、サーバー関係のいろんな覚え書き それと雑談

Cent OS 5.9 ホスト拒否 DenyHosts インストール

# yum install python-devel

# yum --enablerepo=rpmforge install denyhosts

# vi /etc/denyhosts/denyhosts.conf

下記を編集
BLOCK_SERVICE  = sshd → BLOCK_SERVICE  = ALL

# vi /etc/hosts.allow

#
# hosts.allow   This file describes the names of the hosts which are
#               allowed to use the local INET services, as decided
#               by the '/usr/sbin/tcpd' server.
#
ALL: 58.xxx.xxx.xxx       //会社のIPを追記
ALL: 180.xxx.xxx.xxx    //自宅のIPを追記

 

# service denyhosts start  denyhosts スタート

starting DenyHosts:    /usr/bin/env python /usr/bin/denyhosts.py --daemon --config=/etc/denyhosts.conf

# chkconfig denyhosts on

# reboot