Skip to content

Commit 0a1f92c

Browse files
committed
chore(confs): sync jails with upstream Fail2Ban
1 parent ca7d370 commit 0a1f92c

File tree

9 files changed

+89
-8
lines changed

9 files changed

+89
-8
lines changed

jail.conf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Version 2022/08/06
1+
## Version 2025/04/01
22
#
33
# WARNING: heavily refactored in 0.9.0 release. Please review and
44
# customize settings for your setup.
@@ -99,7 +99,9 @@ before = paths-lsio.conf
9999
# ignorecommand = /path/to/command <ip>
100100
ignorecommand =
101101

102-
# "bantime" is the number of seconds that a host is banned.
102+
# "bantime" is the amount of time that a host is banned, integer in seconds or
103+
# time abbreviation format (m - minutes, h - hours, d - days, w - weeks, mo - months, y - years).
104+
# This is to consider as an initial time if bantime.increment gets enabled.
103105
bantime = 10m
104106

105107
# A host is banned if it has generated "maxretry" during the last "findtime"
@@ -113,19 +115,17 @@ maxretry = 5
113115
maxmatches = %(maxretry)s
114116

115117
# "backend" specifies the backend used to get files modification.
116-
# Available options are "pyinotify", "gamin", "polling", "systemd" and "auto".
118+
# Available options are "pyinotify", "polling", "systemd" and "auto".
117119
# This option can be overridden in each jail as well.
118120
#
119121
# pyinotify: requires pyinotify (a file alteration monitor) to be installed.
120122
# If pyinotify is not installed, Fail2ban will use auto.
121-
# gamin: requires Gamin (a file alteration monitor) to be installed.
122-
# If Gamin is not installed, Fail2ban will use auto.
123123
# polling: uses a polling algorithm which does not require external libraries.
124124
# systemd: uses systemd python library to access the systemd journal.
125125
# Specifying "logpath" is not valid for this backend.
126126
# See "journalmatch" in the jails associated filter config
127127
# auto: will try to use the following backends, in order:
128-
# pyinotify, gamin, polling.
128+
# pyinotify, polling.
129129
#
130130
# Note: if systemd backend is chosen as the default but you enable a jail
131131
# for which logs are present only in its own log files, specify some other
@@ -207,8 +207,8 @@ fail2ban_agent = Fail2Ban/%(fail2ban_version)s
207207
# iptables-multiport, shorewall, etc) It is used to define
208208
# action_* variables. Can be overridden globally or per
209209
# section within jail.local file
210-
banaction = iptables-multiport
211-
banaction_allports = iptables-allports
210+
#banaction = iptables-multiport
211+
#banaction_allports = iptables-allports
212212

213213
# The simplest action to take: ban only
214214
action_ = %(banaction)s[port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]

jail.d/mongodb-auth.conf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Version 2016/11/10
2+
# Log wrong MongoDB auth (for details see filter 'filter.d/mongodb-auth.conf')
3+
# change port when running with "--shardsvr" or "--configsvr" runtime operation
4+
5+
[mongodb-auth]
6+
7+
enabled = false
8+
port = 27017
9+
logpath = %(remote_logs_path)s/mongodb/mongodb.log

jail.d/mssql-auth.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## Version 2020/02/24
2+
# Default configuration for Microsoft SQL Server for Linux
3+
# See the 'mssql-conf' manpage how to change logpath or port
4+
5+
[mssql-auth]
6+
7+
enabled = false
8+
logpath = %(remote_logs_path)s/mssql/log/errorlog
9+
port = 1433
10+
filter = mssql-auth

jail.d/mysqld-auth.conf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Version 2025/01/30
2+
# To log wrong MySQL access attempts add to /etc/my.cnf in [mysqld] or
3+
# equivalent section:
4+
# log_error_verbosity = 3
5+
# for older versions:
6+
# log-warnings = 2
7+
# Also check whether `log_error` (or `log-error`) system variable match the `logpath`.
8+
9+
[mysqld-auth]
10+
11+
enabled = false
12+
port = 3306
13+
logpath = %(mysql_log)s
14+
backend = %(mysql_backend)s

jail.d/nginx-forbidden.conf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Version 2023/03/23
2+
# Fail2Ban jail configuration for nginx forbidden
3+
# Works OOTB with defaults
4+
5+
[nginx-forbidden]
6+
7+
enabled = false
8+
port = http,https
9+
logpath = %(nginx_error_log)s

jail.d/openvpn.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## Version 2025/01/29
2+
# Fail2Ban jail configuration for openvpn
3+
4+
[openvpn]
5+
6+
enabled = false
7+
port = 443
8+
logpath = %(logs_path)s/syslog

jail.d/recidive.conf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Version 2025/01/30
2+
# Jail for more extended banning of persistent abusers
3+
# !!! WARNINGS !!!
4+
# 1. Make sure that your loglevel specified in fail2ban.conf/.local
5+
# is not at DEBUG level -- which might then cause fail2ban to fall into
6+
# an infinite loop constantly feeding itself with non-informative lines
7+
# 2. Increase dbpurgeage defined in fail2ban.conf to e.g. 648000 (7.5 days)
8+
# to maintain entries for failed logins for sufficient amount of time
9+
10+
[recidive]
11+
12+
enabled = false
13+
# lsio value
14+
logpath = /config/log/fail2ban/fail2ban.log
15+
banaction = %(banaction_allports)s
16+
bantime = 1w
17+
findtime = 1d

jail.d/routeros-auth.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Version 2023/02/28
2+
3+
[routeros-auth]
4+
5+
enabled = false
6+
port = ssh,http,https
7+
logpath = %(remote_logs_path)s/MikroTik/router.log

jail.d/vaultwarden.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Version 2025/04/01
2+
3+
[vaultwarden]
4+
5+
enabled = false
6+
port = http,https
7+
logpath = %(remote_logs_path)s/vaultwarden.log

0 commit comments

Comments
 (0)