aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWesley Shields <wxs@FreeBSD.org>2012-12-17 18:44:26 +0000
committerWesley Shields <wxs@FreeBSD.org>2012-12-17 18:44:26 +0000
commitdde8a3af5ec565b489f43173bee2da6cceea1224 (patch)
tree6369a3848e77eb309f9e3fa5ce8df3cf292202b2
parent6504637991124e06f44825aae32358d57b5a97cb (diff)
downloadports-dde8a3af5ec565b489f43173bee2da6cceea1224.tar.gz
ports-dde8a3af5ec565b489f43173bee2da6cceea1224.zip
Notes
-rw-r--r--security/py-fail2ban/Makefile1
-rw-r--r--security/py-fail2ban/files/patch-actions.py5
-rw-r--r--security/py-fail2ban/files/patch-bsd-ipfw.conf17
-rw-r--r--security/py-fail2ban/files/patch-bsd-sendmail.conf38
-rw-r--r--security/py-fail2ban/pkg-plist1
5 files changed, 57 insertions, 5 deletions
diff --git a/security/py-fail2ban/Makefile b/security/py-fail2ban/Makefile
index f2c5341a78b1..e2c817265e40 100644
--- a/security/py-fail2ban/Makefile
+++ b/security/py-fail2ban/Makefile
@@ -3,6 +3,7 @@
PORTNAME= fail2ban
PORTVERSION= 0.8.7.1
+PORTREVISION= 1
CATEGORIES= security python
MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/tarball/${PORTVERSION}/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
diff --git a/security/py-fail2ban/files/patch-actions.py b/security/py-fail2ban/files/patch-actions.py
new file mode 100644
index 000000000000..91bfc9879426
--- /dev/null
+++ b/security/py-fail2ban/files/patch-actions.py
@@ -0,0 +1,5 @@
+--- server/actions.py.orig 2012-11-27 18:16:18.000000000 +0100
++++ server/actions.py 2012-11-27 18:17:04.000000000 +0100
+@@ -206 +206 @@
+- logSys.warn("[%s] Unban %s" % (self.jail.getName(), aInfo["ip"]))
++ logSys.warn("[%s] Unban %s" % (self.jail.getName(), str(aInfo["ip"])))
diff --git a/security/py-fail2ban/files/patch-bsd-ipfw.conf b/security/py-fail2ban/files/patch-bsd-ipfw.conf
index b0ffb2468a7f..06468bcaeba8 100644
--- a/security/py-fail2ban/files/patch-bsd-ipfw.conf
+++ b/security/py-fail2ban/files/patch-bsd-ipfw.conf
@@ -1,6 +1,6 @@
---- /dev/null 2010-01-12 16:33:00.000000000 -0500
-+++ ./config/action.d/bsd-ipfw.conf 2010-01-12 16:26:51.000000000 -0500
-@@ -0,0 +1,65 @@
+--- /dev/null 2012-11-27 18:04:17.000000000 +0100
++++ config/action.d/bsd-ipfw.conf 2012-11-27 18:06:29.000000000 +0100
+@@ -0,0 +1,72 @@
+# Fail2Ban configuration file
+#
+# Author: Nick Munger
@@ -36,10 +36,11 @@
+# Tags: <ip> IP address
+# <failures> number of failures
+# <time> unix timestamp of the ban time
++# <table> ipfw table to use
+# Values: CMD
+#
+# requires an ipfw rule like "deny ip from table(1) to me"
-+actionban = ipfw table 1 add <ip>
++actionban = ipfw table <table> add <ip>
+
+
+# Option: actionunban
@@ -48,9 +49,10 @@
+# Tags: <ip> IP address
+# <failures> number of failures
+# <time> unix timestamp of the ban time
++# <table> ipfw table to use
+# Values: CMD
+#
-+actionunban = ipfw table 1 delete <ip>
++actionunban = ipfw table <table> delete <ip>
+
+[Init]
+
@@ -66,3 +68,8 @@
+# Values: IP
+#
+localhost = 127.0.0.1
++
++# Option: table
++# Notes: the ipfw table to use
++# Values: NUM
++table = 1
diff --git a/security/py-fail2ban/files/patch-bsd-sendmail.conf b/security/py-fail2ban/files/patch-bsd-sendmail.conf
new file mode 100644
index 000000000000..d79bdc4d0b91
--- /dev/null
+++ b/security/py-fail2ban/files/patch-bsd-sendmail.conf
@@ -0,0 +1,38 @@
+--- /dev/null 2012-11-27 18:33:00.000000000 +0100
++++ config/filter.d/bsd-sendmail.conf 2012-11-27 18:32:47.000000000 +0100
+@@ -0,0 +1,35 @@
++# Fail2Ban configuration file
++#
++# Source: http://www.the-art-of-web.com/system/fail2ban-sendmail
++# Contributors: Gutza, the SASL regex
++#
++# $Revision$
++
++[INCLUDES]
++
++# Read common prefixes. If any customizations available -- read them from
++# common.local
++before = common.conf
++
++[Definition]
++
++# Option: failregex
++# Notes.: regex to match the password failures messages in the logfile.
++# The host must be matched by a group named "host".
++# The tag "<HOST>" can be used for standard IP/hostname matching
++# and is only an alias for (':::f{4,6}:)?(?P<host>\S+)
++# Values: TEXT
++
++failregex = \[<HOST>\] .*to MTA
++# \[<HOST>\] \(may be forged\)
++ \[<HOST>\], reject.*\.\.\. Relaying denied
++ (User unknown)\n* \[<HOST>\]
++ badlogin: .* \[<HOST>\] plaintext .* SASL
++ \[<HOST>\]: possible SMTP attack:
++
++# Option: ignoreregex
++# Notes.: regex to ignore. If this regex matces, the line is ignored.
++# Values: TEXT
++
++ignoreregex =
++ \ No newline at end of file
diff --git a/security/py-fail2ban/pkg-plist b/security/py-fail2ban/pkg-plist
index 4d6eebb1f9f9..a856c1377790 100644
--- a/security/py-fail2ban/pkg-plist
+++ b/security/py-fail2ban/pkg-plist
@@ -29,6 +29,7 @@
%%ETCDIR%%/filter.d/apache-noscript.conf
%%ETCDIR%%/filter.d/apache-overflows.conf
%%ETCDIR%%/filter.d/asterisk.conf
+%%ETCDIR%%/filter.d/bsd-sendmail.conf
%%ETCDIR%%/filter.d/bsd-sshd.conf
%%ETCDIR%%/filter.d/bsdftp.conf
%%ETCDIR%%/filter.d/common.conf