summaryrefslogtreecommitdiff
path: root/community/sshguard
diff options
context:
space:
mode:
Diffstat (limited to 'community/sshguard')
-rw-r--r--community/sshguard/ChangeLog3
-rw-r--r--community/sshguard/PKGBUILD27
-rw-r--r--community/sshguard/sshguard.install8
-rwxr-xr-xcommunity/sshguard/sshguard.rc26
4 files changed, 64 insertions, 0 deletions
diff --git a/community/sshguard/ChangeLog b/community/sshguard/ChangeLog
new file mode 100644
index 000000000..811f87d4f
--- /dev/null
+++ b/community/sshguard/ChangeLog
@@ -0,0 +1,3 @@
+2007-06-28 tardo <tardo@nagi-fanboi.net>
+* Built for x86_64
+
diff --git a/community/sshguard/PKGBUILD b/community/sshguard/PKGBUILD
new file mode 100644
index 000000000..f98609e15
--- /dev/null
+++ b/community/sshguard/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 43444 2011-03-26 08:45:23Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
+
+pkgname=sshguard
+pkgver=1.5
+pkgrel=1
+pkgdesc="brute force detector for SSH, Exim, VSFTPD and more. Blocks by ip with iptables"
+arch=('i686' 'x86_64')
+#url="http://sourceforge.net/projects/sshguard/"
+url="http://www.sshguard.net/"
+license=('GPL')
+depends=('glibc')
+options=(zipman)
+install=sshguard.install
+source=("http://downloads.sourceforge.net/sourceforge/sshguard/sshguard-$pkgver.tar.bz2"
+ sshguard.rc)
+md5sums=('11b9f47f9051e25bdfe84a365c961ec1'
+ '87977af93930c3867edffe3b2018f56e')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ ./configure --prefix=/usr --with-firewall=iptables
+ make
+ make prefix=$pkgdir/usr install
+ install -D -m0755 $srcdir/sshguard.rc $pkgdir/etc/rc.d/sshguard
+}
diff --git a/community/sshguard/sshguard.install b/community/sshguard/sshguard.install
new file mode 100644
index 000000000..0821c61e0
--- /dev/null
+++ b/community/sshguard/sshguard.install
@@ -0,0 +1,8 @@
+post_install() {
+ mkdir -p /var/db/sshguard
+ echo "-- You should add chain to your firewall:"
+ echo "-- iptables -N sshguard"
+ echo "-- iptables -A INPUT -p tcp --dport 22 -j sshguard"
+ echo "-- For more information, see http://www.sshguard.net/doc/"
+ /bin/true
+}
diff --git a/community/sshguard/sshguard.rc b/community/sshguard/sshguard.rc
new file mode 100755
index 000000000..4b8dee06f
--- /dev/null
+++ b/community/sshguard/sshguard.rc
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting SSHGuard"
+ tail -n0 -F /var/log/auth.log | /usr/sbin/sshguard -b /var/db/sshguard/blacklist.db &> /dev/null &
+ add_daemon sshguard
+ stat_done
+ ;;
+ stop)
+ stat_busy "Stopping SSHGuard"
+ kill `pidof sshguard` &> /dev/null
+ rm_daemon sshguard
+ stat_done
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+*)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0