Denyhosts on FreeBSD 8

Denyhosts on FreeBSD 8
Lars Sommer, lasg@lasg.dk, 2011-06-20

Install the port security/denyhosts

Add to /etc/rc.conf
denyhosts_enable=”YES”
add syslogd_flags=”-c”

in /etc/hosts.allow add:
sshd : /etc/hosts.deniedssh : deny
sshd : ALL : allow

Or, if anything should be denied from these hosts who fails ssh login; insert ALL instead of sshd. If done so, change the BLOCK_SERVICE line in denyhosts.conf from sshd to ALL as well.

touch /etc/hosts.deniedssh

/etc/rc.d/syslogd restart
/usr/local/etc/rc.d/denyhosts start

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>