security/bruteblock: update to 0.0.6

- use pcre2 instead of pcre
- integrate patches from the port
- take maintainership

PR: 282821
This commit is contained in:
Oleksii Samorukov 2024-12-21 13:10:04 +01:00
parent c6f173c5a4
commit ac02820455
5 changed files with 9 additions and 52 deletions

View File

@ -1,21 +1,22 @@
PORTNAME= bruteblock
PORTVERSION= 0.0.5
PORTREVISION= 11
PORTVERSION= 0.0.6
DISTVERSIONPREFIX= v
CATEGORIES= security
MASTER_SITES= https://samm.kiev.ua/bruteblock/
MAINTAINER= amdmi3@FreeBSD.org
MAINTAINER= samm@FreeBSD.org
COMMENT= Software for blocking bruteforce attacks with ipfw
WWW= https://samm.kiev.ua/bruteblock/
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/doc/LICENSE
LIB_DEPENDS= libpcre.so:devel/pcre
LIB_DEPENDS= libpcre2-8.so:devel/pcre2
SUB_FILES= pkg-message
USE_RC_SUBR= bruteblockd
USE_GITHUB= yes
GH_ACCOUNT= samm-git
CONFDIR= ${PREFIX}/etc/${PORTNAME}

View File

@ -1,2 +1,3 @@
SHA256 (bruteblock-0.0.5.tar.gz) = 7c7ef533b27be1d72e43a7fa6828896124a4f22808f2a0ecca2e587e1563e253
SIZE (bruteblock-0.0.5.tar.gz) = 24971
TIMESTAMP = 1731881673
SHA256 (samm-git-bruteblock-v0.0.6_GH0.tar.gz) = f13df4444c9686ff109e1fadaa62e95608630c0284e57bcad27f0528e3bcf51a
SIZE (samm-git-bruteblock-v0.0.6_GH0.tar.gz) = 24665

View File

@ -1,11 +0,0 @@
--- Makefile.orig 2006-08-20 10:22:37.000000000 +0400
+++ Makefile 2009-03-24 22:12:58.000000000 +0300
@@ -18,7 +18,7 @@
bruteblock: $(BRUTEBLOCK_OBJS) iniparse/libiniparser.a
$(CC) $(LDFLAGS) -o $@ $(BRUTEBLOCK_OBJS) $(EXTRA_LIBS)
-bruteblockd: $(BRUTEBLOCKD_OBJS) pidfile.h
+bruteblockd: $(BRUTEBLOCKD_OBJS) iniparse/libiniparser.a pidfile.h
$(CC) $(LDFLAGS) -o $@ $(BRUTEBLOCKD_OBJS) $(EXTRA_LIBS)
clean:

View File

@ -1,12 +0,0 @@
--- bruteblock.c.orig 2006-08-20 08:22:37.000000000 +0200
+++ bruteblock.c 2014-10-15 16:19:19.000000000 +0200
@@ -99,7 +99,7 @@
snprintf(table, sizeof(table), "%d", ipfw2_table_no);
argv[1] = table;
argv[2] = command;
- snprintf(utime, sizeof(utime), "%d",
- time(NULL) + reset_ip);
+ snprintf(utime, sizeof(utime), "%lld",
+ (long long)(time(NULL) + reset_ip));
argv[4] = utime;
argv[3] = host;

View File

@ -1,22 +0,0 @@
--- etc/ssh.conf.orig 2006-08-20 10:22:37.000000000 +0400
+++ etc/ssh.conf 2009-10-14 03:46:53.000000000 +0400
@@ -14,8 +14,17 @@
# comment: correct user, but wrong password
#sshd[72626]: Failed password for samm from 1.2.3.4
#
-regexp = sshd.*Illegal user \S+ from (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
-regexp1 = sshd.*Failed password for (?:illegal user )?\S+ from (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
+# comment: other messages
+#sshd[41945]: error: PAM: authentication error for alice from 192.168.0.1
+#sshd[41945]: error: PAM: authentication error for illegal user root from 192.168.0.1
+#sshd[41945]: Failed keyboard-interactive/pam for invalid user root from 192.168.0.1 port 64507 ssh2
+#sshd[16666]: Failed unknown for illegal user asdfasdfasd from 192.168.0.1 port 52652 ssh2
+#sshd[16666]: Did not receive identification string from 192.168.0.1
+#
+regexp = sshd.*(?:Illegal|Invalid) user \S+ from (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
+regexp1 = sshd.*Failed \S+ for (?:(?:illegal|invalid) user )?\S+ from (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
+regexp2 = sshd.*error: PAM: authentication error for (?:(?:illegal|invalid) user )?\S+ from (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
+regexp3 = sshd.*Did not receive identification string from (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
# Number of failed login attempts within time before we block
max_count = 4