Text Size
   

DenyHosts

DenyHosts は、ssh でアクセスしてきたユーザが設定した回数パスワードを間違えると、その後のアクセスを拒否するアプリケーションです。
この DenyHosts を利用するには、portmap が必要です。

まず、http://denyhosts.sourceforge.net/ >>> [download] から最新版のパッケージをダウンロードします。

次に、任意のディレクトリでダウンロードしたパッケージを解凍し、インストールを行います。

# tar zxvf DenyHosts-2.6
# cd DenyHosts-2.6
# python setup.py install

インストールが完了したら、必要なファイルをコピーし、起動スクリプトをコピー、自動起動に設定し、起動します。

# cd /usr/share/denyhosts
# cp denyhosts.cfg-dist denyhosts.cfg
# cp daemon-control-dist daemon-control
# chown root daemon-control
# chmod 700 daemon-control
# cd /etc/init.d/
# ln -s /usr/share/denyhosts/daemon-control denyhosts
# chkconfig --add denyhosts
# chkconfig denyhosts on
# /etc/init.d/denyhosts start

 

設定ファイルは denyhosts.cfg ですので、サーバ環境に合わせて設定してください。
デフォルトのままでも動作に問題はありません。