summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/blocksshd/blocksshd-0.9.ebuild')
-rw-r--r--net-misc/blocksshd/blocksshd-0.9.ebuild54
1 files changed, 54 insertions, 0 deletions
diff --git a/net-misc/blocksshd/blocksshd-0.9.ebuild b/net-misc/blocksshd/blocksshd-0.9.ebuild
new file mode 100644
index 000000000..ca95acd14
--- /dev/null
+++ b/net-misc/blocksshd/blocksshd-0.9.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils
+
+DESCRIPTION="Protects computers from SSH brute force attacks by dynamically blocking IP addresses by adding iptables rules."
+HOMEPAGE="http://sourceforge.net/projects/blocksshd"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=perl-core/Sys-Syslog-0.16
+ >=dev-perl/Sys-Hostname-Long-1.2
+ >=dev-perl/File-Tail-0.99.1
+ >=dev-perl/Net-DNS-0.53-r1
+ >=perl-core/Getopt-Long-2.34
+ >=net-firewall/iptables-1.3.5-r1"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # convert CRLF to LF
+ edos2unix blocksshd blocksshd.conf
+
+ #apply patches
+ epatch "${FILESDIR}"/blocksshd-${PV}.conf-dir-change.patch
+ epatch "${FILESDIR}"/blocksshd-${PV}.etc-dir-change.patch
+}
+
+src_install() {
+ dosbin blocksshd || die "dosbin failed"
+ dodoc CHANGELOG CREDITS README VERSION blocksshd.conf
+
+ newinitd ${FILESDIR}/blocksshd.init blocksshd
+
+ insinto /etc/blocksshd
+ newins blocksshd.conf blocksshd.conf.sample
+}
+
+pkg_postinst() {
+ ewarn
+ ewarn "The configuration file ${ROOT}etc/blocksshd/blocksshd.conf.sample"
+ ewarn "must be renamed before blocksshd will run."
+ ewarn "Please review this configuration file for settings that might"
+ ewarn "be appropiate for your setup."
+ ewarn
+}