Commit Graph

6071 Commits (b0d4eb07e5719a03c9eb0edf647cd0ff3272291e)

Author SHA1 Message Date
sebres b0d4eb07e5 command-line: test config shall output error directly and not using logger 2025-03-19 02:44:32 +01:00
sebres d02a613e89 configreaders: don't swallow return code by decoding error (whole jail or fail2ban config failed to read due to some error like encoding etc), so dump or test of config would get an error at end (and coverage for #3971) 2025-03-19 02:19:16 +01:00
sebres 8ae6eaf39a `filter.d/postfix.conf` - default `_daemon` in prefix-line is loosened - can match everything starting with word postfix, like `postfix-example.com/smtpd`;
closes gh-3297
2025-03-10 22:35:26 +01:00
Sergey G. Brester 505d51fd5d
Update PULL_REQUEST_TEMPLATE.md 2025-03-04 19:19:57 +01:00
sebres 4bb1fd519d test-suite: if failed, sample regexs factory would show responsible header line (failJSON) together with the error line 2025-03-04 14:39:24 +01:00
sebres cf9c8f1e9b test-suite: fixed sample regexs factory counting of line number (if it errors, the line number showing in error line was incorrect, because of missing increment) 2025-03-04 14:27:21 +01:00
Sergey G. Brester c035428535
Merge pull request #3954 from luckylittle/feature/systemd-journal-vsftpd
`filter.d/vsftpd.conf` - fixed regex (if failures generated by systemd-journal)
2025-03-04 14:20:01 +01:00
sebres 79346e4f2c updated ChangeLog 2025-03-04 14:15:14 +01:00
sebres 94fe9cf4a8 more fixes, capture user names, more tests...
since line 7 matches successfully now (it was disabled in gh-358 because of obsolete format), it is marked as match:true (line can be removed later if unneeded)
2025-03-04 14:13:07 +01:00
sebres 1e06ab68b4 fixed filter (new regex is unneeded), tests format of failures produced by system journal 2025-03-04 13:47:59 +01:00
Sergey G. Brester e9a42847bc
Merge pull request #3955 from luckylittle/feature/systemd-journal-lighttpd
`filter.d/lighttpd-auth.conf` - fixed regex (if failures generated by systemd-journal), bypass several prefixes now
2025-03-04 13:21:43 +01:00
Sergey G. Brester 3e9a4b4a48
Update ChangeLog 2025-03-04 13:20:54 +01:00
Sergey G. Brester 95cdf553f5
fixes test in lighttpd-auth: added failJSON to match the line 2025-03-04 13:09:21 +01:00
Sergey G. Brester 13a74feaad
2nd RE unneeded, fix single RE - bypass everything before open parenthesis 2025-03-04 13:02:50 +01:00
Lucian Maly 6e3bfd800c
Added author 2025-03-04 12:26:14 +11:00
Lucian Maly 9d7646e6c0
Added author 2025-03-04 12:25:27 +11:00
Lucian Maly f5ba525cd2
Added sample log line 2025-03-04 12:22:35 +11:00
Lucian Maly fd1d0d25a8
Added regex for systemd-journal matches of lighttpd-auth 2025-03-04 12:20:24 +11:00
Lucian Maly bd4cb606e5
Added sample log line 2025-03-04 11:47:49 +11:00
Lucian Maly 65d473fc8e
Added regex for systemd-journal matches of vsftpd 2025-03-04 11:43:38 +11:00
sebres e3ab969047 increase interval for up-to-date check (to 1 minute) after error, to avoid continuous flood in log on further possible errors 2025-03-04 00:07:31 +01:00
sebres 9145db8de3 small code review of FileIPAddrSet: encapsulate check for changed logic to _isModified and slightly increase coverage for it (latency, changed, unchanged) 2025-03-03 23:59:36 +01:00
sebres 7233edd0bf amend ChangeLog updated: `ignoreip` extended with `file:...` syntax to ignore IPs from file-ip-set;
+ silence codespell
2025-03-03 20:07:05 +01:00
sebres c54f1a4603 Merge branch 'ignore-file-ip-addr-set':
configuration `ignoreip` and fail2ban-client commands `addignoreip`/`delignoreip` extended with `file:...` syntax to ignore IPs from file-ip-set (containing IP, subnet, dns/fqdn or raw strings);
the file would be read lazy on demand, by first ban (and automatically reloaded by update after small latency to avoid expensive stats check on every compare);
the entries inside the file can be separated by comma, space or new line with optional comments (text following chars # or ; after space or newline would be ignored up to next newline)
2025-03-03 20:00:32 +01:00
sebres 5bea1c87f1 add few comments to test-ign-ips-file for the sake of completeness and coverage 2025-03-03 19:52:23 +01:00
sebres 6efa3a3144 man extended (`ignoreip` supports file://path/file-with-ip-set) 2025-03-03 19:19:21 +01:00
sebres fe37047061 test coverage for FileIPAddrSet and ignoreip for file://... 2025-03-03 19:06:08 +01:00
sebres 81a5b1596b filter and configuration `ignoreip` extended with file:... to ignore IPs from file-ip-set (containing IP, subnet, dns/fqdn or raw strings); the file would be read lazy on demand, by first ban (and automatically reloaded by update after small latency) 2025-03-03 19:03:48 +01:00
sebres d684339edd allow comments in file with ip-set: text followed # or ; chars after space or newline would be ignored 2025-03-03 19:00:09 +01:00
sebres bdae15b522 ipdns.py: implemented FileIPAddrSet supporting file with IP-set, what may contain IP, subnet, or dns, with lazy load and dynamically reloaded by changes (with small latency to avoid expensive stats check on every compare) 2025-03-03 18:40:15 +01:00
Sergey G. Brester c9b5e845ba
`action.d/cloudflare-token.conf`: fixes `actionunban` retrieving of CF-ID from IP:
force adding parameters to URL as query string (add `-G` to curl);
closes gh-3952
2025-03-01 20:19:35 +01:00
Sergey G. Brester e5199aee92
action.d/ufw.conf: update comment:
fix syntax in example, because `dst` as command parameter doesn't have precedence over or-expression, so second `sport` would ignore `dst` and kill any connection for https regardless the IP
2025-03-01 00:23:55 +01:00
sebres 1c61836169 main.yml: merge branch 'gha-try-new-runner':
- update runner image (20.04 gets end of date)
- update python versions (v.3.7 is unsupported for 24.04, bump v.3.14 to next alpha)
2025-02-25 18:38:19 +01:00
Sergey G. Brester fdac34a3ee
main.yml: update python versions
v.3.7 is unsupported for 24.04, bump v.3.14 to next alpha
2025-02-25 18:29:26 +01:00
Sergey G. Brester c340fb0ef4
main.yml: update runner image
(20.04 gets end of date)
2025-02-25 18:24:40 +01:00
sebres 882e6d5e00 `filter.d/exim.conf` - mode `aggressive` extended to catch dropped by ACL failures, e.g. "ACL: Country is banned" 2025-02-10 17:30:07 +01:00
Sergey G. Brester 2d736ad755 small amend 2025-01-31 19:54:24 +01:00
Sergey G. Brester a44c8dc3ec
Update FILTERS: clarify and improve docu, update some urls, etc
(related #3934)
2025-01-31 19:51:29 +01:00
Sergey G. Brester 6fb3532c45
Merge pull request #3931 from brianjmurrell/patch-2
`from '[^']*'` is not always present …
2025-01-30 14:06:00 +01:00
sebres a1268f37c3 amend (move ChangeLog entry) 2025-01-30 14:04:00 +01:00
sebres b55c20594e `paths-common.conf`: changed default `mysql_log` path (default `logpath` of `mysqld-auth` jail without maintainer overrides); adjusted comments (`log_error_verbosity = 3` instead of `log-warnings = 2`)
closes gh-3932
2025-01-30 14:00:43 +01:00
Sergey G. Brester 6d3308ecb4
Merge pull request #2702 from pburndorfer/master
New openvpn jail
2025-01-30 13:16:44 +01:00
Brian J. Murrell b8ab346257
Merge branch 'fail2ban:master' into patch-2 2025-01-29 19:36:54 -05:00
sebres d2c60a168f combine several regexes to single RE 2025-01-30 01:13:49 +01:00
sebres e1fc569291 normalize jail (defaults, etc); added missing tests for all REs; common prefix for failregex, no catch-alls, etc 2025-01-30 01:13:48 +01:00
Philipp Burndorfer 95710e9dac Adapted changelog. 2025-01-30 01:13:47 +01:00
Philipp Burndorfer 88385eb6c1 New openvpn jail. 2025-01-30 01:13:46 +01:00
sebres 7a5e2c8419 Merge branch 'example-com-ips': fixed test-suite (adjusted fqdn/ips, codespell) 2025-01-30 01:12:37 +01:00
sebres 8c6d7dc12f GHA main.yml: update python versions ('3.14.0-alpha.4') 2025-01-30 01:09:20 +01:00
sebres 5b6c13f0aa example.com changes the IPs, again... additionally it got more IPs, which look unstable now (depends on resolver), so replaced with fail2ban.org, that seems to resolve to single IPv4 and IPv6 (can be adjusted later for something more persistent) 2025-01-30 01:05:30 +01:00