Project

General

Profile

Installation von DenyHosts auf Ubuntu Server

Installation

cd /tmp
wget http://sourceforge.net/projects/denyhost/files/denyhost-2.9/denyhosts-2.9.tar.gz
tar xzf denyhosts-2.9.tar.gz
cd DenyHosts-2.9/
python setup.py install

edit /etc/denyhosts.conf nach belieben

z.B.

## disable adding IpTables rules
#IPTABLES = /sbin/iptables
## allow 3 wrong root logins
DENY_THRESHOLD_ROOT = 3

Start/Stop Script

cd /usr/local/bin
cp daemon-control-dist daemon-control

# fix start binary
sed -i s/'DENYHOSTS_BIN   = "\/usr\/sbin\/denyhosts"'/'DENYHOSTS_BIN   = "\/usr\/local\/bin\/denyhosts.py"'/g daemon-control

ln -s /usr/local/bin/daemon-control /etc/init.d/denyhosts
update-rc.d denyhosts defaults

starten & testen

service denyhosts start

prüfen des logfiles: /var/log/denyhosts