1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 DESCRIPTION="Protects computers from SSH brute force attacks by dynamically blocking IP addresses over iptables"
8 HOMEPAGE="http://sourceforge.net/projects/blocksshd/"
9 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
18 RDEPEND=">=virtual/perl-Sys-Syslog-0.16
19 >=dev-perl/Sys-Hostname-Long-1.2
20 >=dev-perl/File-Tail-0.99.1
21 >=dev-perl/Net-DNS-0.53-r1
22 >=dev-perl/Net-Subnets-0.21
23 >=virtual/perl-Getopt-Long-2.34
24 >=net-firewall/iptables-1.3.5-r1"
31 edos2unix blocksshd blocksshd.conf
34 epatch "${FILESDIR}"/${P}.conf-dir-change.patch
35 epatch "${FILESDIR}"/${P}.etc-dir-change.patch
39 dosbin blocksshd || die "dosbin failed"
40 dodoc CHANGELOG CREDITS README VERSION blocksshd.conf
42 newinitd "${FILESDIR}"/blocksshd.init blocksshd
44 insinto /etc/blocksshd
45 newins blocksshd.conf blocksshd.conf.sample
50 ewarn "The configuration file ${ROOT}etc/blocksshd/blocksshd.conf.sample"
51 ewarn "must be renamed before blocksshd will run."
52 ewarn "Please review this configuration file for settings that might"
53 ewarn "be appropiate for your setup."