Last active
December 25, 2022 07:35
-
-
Save Strykar/03d2b24db4a9088be6d3ce11891466b8 to your computer and use it in GitHub Desktop.
A single file config for adding bots that probe Weechat's relay port to a Fail2ban jail (/etc/fail2ban/jail.d/weechat.conf)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[weechat] | |
filter = | |
enabled = false | |
banaction = nftables | |
action = nftables-allports[name=weechat] | |
backend = auto | |
logpath = /home/user/.local/share/weechat/logs/core.weechat.weechatlog | |
logencoding = utf-8 | |
port = 9000 | |
protocol = tcp | |
banTime = 1w | |
findtime = 1d | |
maxRetry = 2 | |
ignoreip = 127.0.0.0/8 ::1 10.0.0.0/24 172.16.0.0/12 192.168.1.0/24 | |
failregex = ^\s*(?:=!=\s*)?relay: (?:reading data on socket|TLS handshake failed) for client \d+/ssl.weechat/<ADDR>: error -?\d+ | |
# To match on specific TLS errors: | |
#failregex = ^\s*(?:=!=\s*)?relay: (?:reading data on socket|TLS handshake failed) for client \d+/ssl.weechat/<ADDR>: error (?:0|-8|-110|-87|-54|-15)\b | |
# Author: Sergey G. Brester (sebres) | |
# Strykar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment