Fix: usedns=no in fail2ban, exact quoted host regex for asterisk, and timeout 2 on all fail2ban-client calls

This commit is contained in:
sorcier committed 2026-11-02 08:56:27 +01:00
1 parent aba35dbe3a
commit 8bbeb9caae
3 files changed
+48 -11

No files matched your search

+2 -1
View File
@@ -361,7 +361,7 @@ cat << 'EOF' > /etc/fail2ban/filter.d/asterisk.conf
before = common.conf
[Definition]
failregex = ^(%(__prefix_line)s|\[\]\s*)*(?:NOTICE|SECURITY)\[\d+\]:? (?:\S+: )?(?:Registration from |Call from |Invalid password for |Sending fake auth challenge to |No matching endpoint found for )?'?<HOST>(?::\d+)?'?
failregex = ^(%(__prefix_line)s|\[\]\s*)*(?:NOTICE|SECURITY)\[\d+\]:? (?:\S+: )?(?:Registration from |Call from |Invalid password for |Sending fake auth challenge to |No matching endpoint found for )?'<HOST>'(?::\d+)?
^(%(__prefix_line)s|\[\]\s*)*SECURITY\[\d+\]:? (?:\S+: )?SecurityEvent="(?:FailedACL|InvalidAccountID|ChallengeResponseFailed|InvalidPassword|AuthFailed)"(?:.*?)RemoteAddress="IPV[46]/(?:UDP|TCP|TLS)/<HOST>/\d+"
ignoreregex =
EOF
@@ -380,6 +380,7 @@ cat << 'EOF' > /etc/fail2ban/jail.local
bantime = 3600
findtime = 600
maxretry = 3
usedns = no
ignoreip = 127.0.0.1/8 ::1 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16
[asterisk]