sebres
a45488465e
prepare release: bump version, update ChangeLog, man's and MANIFEST etc.
2018-01-18 14:49:01 +01:00
sebres
81b61fe30c
ChangeLog update
2018-01-18 14:19:55 +01:00
sebres
f69e28adfc
action.d/pf.conf: compatibility fix - recognizes that parameter port specified as empty, with or without braces (should be more backwards compatible to 0.9 now).
2018-01-18 14:05:22 +01:00
sebres
ed22ddbbbb
Merge remote-tracking branch 'remotes/gh-upstream/master' into 0.10
2018-01-17 16:42:56 +01:00
Sergey G. Brester
37f5a6975e
Merge pull request #2015 from BenediktSeidl/nginx-http-auth--spaces-fix
...
nginx-http-auth: match usernames with spaces
2018-01-17 16:40:54 +01:00
sebres
63e906b2c1
regex rewritten: a bit fewer vulnerable now and using non-capturing groups, test-cases extended in order to cover trying of injection on user name
2018-01-17 16:35:32 +01:00
Benedikt Seidl
fed6c49c2d
nginx-http-auth: match usernames with spaces
...
# Conflicts:
# ChangeLog
2018-01-17 16:35:31 +01:00
Sergey G. Brester
9a8c4a9869
Merge pull request #2018 from riceru/patch-1
...
lighttpd-auth.conf: new log-format (http_auth -> mod_auth)
2018-01-17 12:14:38 +01:00
Sergey G. Brester
b6c6565a7e
regex updated using non-capturing groups
2018-01-16 14:23:47 +01:00
Sergey G. Brester
9a46590486
extended test-cases to cover new log-format (http_auth -> mod_auth)
2018-01-16 14:20:51 +01:00
riceru
6a1bbbf101
Update lighttpd-auth.conf
...
I have lighttpd 1.4.45 (Debian 9) and auth error log is different.
Now printing mod_auth and not http_auth.
I think that the change was in Lighttp 1.4.42
2018-01-16 12:39:55 +00:00
sebres
2b7b0da943
Merge remote-tracking branch 'remotes/gh-upstream/master' into 0.10
2018-01-15 18:16:43 +01:00
sebres
2bce0c5e3e
file-filter's: provide stop function in order to explicitly delete/stop monitoring of each file.
2018-01-15 18:00:15 +01:00
sebres
81c86fa83f
Remove annoying error-message "rm_watch: cannot remove WD=2, Errno=Invalid argument (EINVAL)", logged from pyinotify-module if rm_watch called with non-existing watch file descriptor (probably multi-threaded issue by dual-remove).
...
Closes gh-1865
2018-01-15 17:12:07 +01:00
sebres
b644d2d73f
should fix sporadic coverage decrease (don't cover "return", because too sporadic to get idle in pyinotify-callback);
2018-01-11 20:23:22 +01:00
sebres
7516cd025d
fixed restoring sane environment (via stop/start) if invariant check failed: bypass possible errors in stop (if start/check succeeded hereafter);
...
test cases extended to cover such situation.
Closes gh-1997
2018-01-11 13:21:36 +01:00
Serg G. Brester
7e05976ead
action.d/hostsdeny.conf: actionunban rewritten using sed, also dots in IP were escaped now.
...
Closes #2000
2018-01-11 12:38:34 +01:00
sebres
29e1fe9479
micro-fix: delete temporary file (forgotten in test-case test_move_dir by reassign to directory)
2018-01-11 11:15:58 +01:00
Serg G. Brester
6251fcf5f7
Merge pull request #2014 from sebres/sshd-fix-connects-with-mult-pub-keys
...
stop ban of legitimate users with multiple public keys (e. g. git, etc)
2018-01-11 10:27:35 +01:00
sebres
1c0fc73e48
Update ChangeLog
2018-01-11 10:27:38 +01:00
sebres
2112145eb4
stop ban of legitimate users with multiple public keys (e. g. git, etc), thereby
...
differentiate between "invalid user" (going banned earlier) and valid users with public keys, for which the rejects of not valid public keys (failures) will be retarded up to "Too many authentication failures" resp. disconnect without success (accepted public key).
2018-01-10 19:07:20 +01:00
sebres
314e402fe0
filter.d/sendmail-auth.conf - extended daemon for Fedora 24/RHEL - the daemon name is "sendmail" (gh-1632)
2018-01-10 14:49:06 +01:00
sebres
c36fbdf743
test cases extended in order to cover firewallcmd-ipset with allports
2018-01-10 12:13:07 +01:00
sebres
c30144b37a
Merge branch '0.9' into 0.10
...
# Conflicts:
# config/action.d/firewallcmd-ipset.conf
# config/filter.d/asterisk.conf
# Merge-point after cherry-pick, no changes:
# fail2ban/client/jailreader.py
# fail2ban/helpers.py
2018-01-10 12:05:26 +01:00
Serg G. Brester
029cd5aa24
Update ChangeLog
2018-01-10 11:47:59 +01:00
Serg G. Brester
597a27576e
Merge pull request #1908 from GetPageSpeed/firewallcmd-ipset-allports
...
New ban mode `allports` for `firewallcmd-ipset`. Closes #1167
2018-01-10 11:43:44 +01:00
sebres
131b94e11e
firewallcmd-ipset-allports: implemented in action.d/firewallcmd-ipset.conf now (action.d/firewallcmd-ipset-allports.conf removed), usage:
...
banaction = firewallcmd-ipset[actiontype="<allports>"]
2018-01-10 10:58:03 +01:00
Danila Vershinin
c190631f88
New ban action firewallcmd-ipset-allports. Closes #1167
2018-01-10 10:58:01 +01:00
sebres
3d9a112c8f
cherry-pick newer version of extractOptions, in order to avoid large discrepancy between 0.10 and 0.9 config-parsers:
...
allow to use dual parameter lists (coming through substitutions), e. g.: `name[p1=0, p2="..."][p3='...']`;
simplified explanation: `][` treats as `,` in new version.
cherry-picked from 0.10.
2018-01-10 10:57:59 +01:00
Serg G. Brester
82f8bd8639
Merge pull request #2011 from Yannik/patch-1
...
Fix filter not catching asterisk requests with quote character in username (fixes #2010 )
2018-01-10 09:27:29 +01:00
Serg G. Brester
f7e2d3610b
Update ChangeLog
2018-01-09 21:19:01 +01:00
Serg G. Brester
a1d1498561
Restore log-entries not affected by #2011
2018-01-09 21:13:02 +01:00
sebres
f6d0c86533
test cases extended: flush jail in database
2018-01-09 12:16:37 +01:00
sebres
2c69c0e7e5
flush jail in database: bulk remove of all IPs in the database (e. g. reload --unban).
2018-01-09 12:15:56 +01:00
Yannik Sembritzki
aab54bb0dd
don't replace normal test case with specialized test case
2018-01-08 22:29:43 +01:00
Yannik Sembritzki
94f0b15c32
Allow faster parsing of hosts without ' characters in them
2018-01-08 14:54:32 +01:00
Yannik Sembritzki
eaf5e88692
replace actual offenders ip with 1.2.3.4
2018-01-03 19:00:09 +01:00
Yannik Sembritzki
184202c6aa
remove duplicate testcase
2018-01-03 18:49:38 +01:00
Yannik Sembritzki
a53ee46ad4
add test for asterisk pjsip attack with quote in username
2018-01-03 18:48:11 +01:00
Yannik Sembritzki
b28dfb965a
Fix filter not catching asterisk requests with quote character in username ( fixes #2010 )
2018-01-03 18:39:30 +01:00
sebres
1e39c2600c
cherry-pick from 0.11: changes in updateDb because it can be executed after repair, and some tables can be missing.
2017-12-22 17:21:11 +01:00
sebres
277edd5fe5
amend to pull request #2004 : merge remote-tracking branch 'sebres/auto-repair-database' into 0.10
2017-12-22 16:21:22 +01:00
sebres
ab3d03beec
Better variant of repair database: recreate all tables/indices, that can be missing after supposedly successful rescue
2017-12-22 16:13:57 +01:00
Serg G. Brester
75f00a3a6c
Merge pull request #2004 from sebres/auto-repair-database
...
Automatically recover or recreate corrupt persistent database
2017-12-22 14:31:25 +01:00
Serg G. Brester
b104da2800
Merge pull request #2005 from sebres/0.10
...
Stability fix for fail2banclienttestcase, avoid sporadic coverage decrease.
2017-12-22 14:27:20 +01:00
sebres
a10d544ddc
coverage: fix another sporadic coverage decrease, if idle mode never reached in some test-cases (e. g. by slowly reloading of jails).
2017-12-22 14:12:19 +01:00
sebres
80932af406
coverage: testErrorsInLoop should avoid sporadic coverage changes, if some communication errors not occurred sometimes.
2017-12-22 13:29:35 +01:00
sebres
a1fd2c507e
method waitForServerEnd renamed into stopAndWaitForServerEnd (because will also stop the server)
2017-12-22 13:00:29 +01:00
sebres
1ad587ac7c
Stability fix for fail2banclienttestcase:
...
- provide waitForServerEnd method for decorator `with_foreground_server_thread`, to wait for real server stop if needed;
- accept any exit code in decorator `with_foreground_server_thread`, because multi-threaded, thus server can exit in-between;
- fix sporadic fail "AssertionError: 'Banned 5 / 5, 5 ticket(s)' was not found" (if some tickets will be processed earlier,
thus not as chunk but separately), so in case of:
Banned 1 / 1, 1 ticket(s) in 'nginx-blck-lst'
Banned 4 / 5, 5 ticket(s) in 'nginx-blck-lst'
2017-12-22 12:36:01 +01:00
Serg G. Brester
2d23f35d26
Update ChangeLog
...
typo: missing newline restored.
2017-12-21 22:50:54 +01:00
sebres
79443210ad
Update ChangeLog
2017-12-21 22:49:57 +01:00
sebres
9374de59f3
Automatically recover or recreate corrupt persistent database (e. g. if failed to open with 'database disk image is malformed').
...
Closes #1465
2017-12-21 22:38:54 +01:00
Serg G. Brester
61109d5c4f
Merge pull request #1996 from meke/firewallcmd-new_actioncheck_error
...
firewallcmd-new actioncheck Error
2017-12-09 15:59:40 +01:00
root
79f414c6a2
fix <family> typo
2017-12-09 15:55:45 +01:00
root
7c63eb2378
In the CentOS7 and epel environment, result of "firewall-cmd -direct -get -chains ipv4 filter" is displayed one line
...
Changed to be multiple lines with reference to firewallcmd-multiport.conf
2017-12-09 15:55:45 +01:00
Serg G. Brester
95a87077f7
Merge pull request #1995 from sebres/firewallcmd-ipset-flush
...
action.d/firewallcmd-ipset.conf: extended with actionflush to bulk unban resp. flush ipset
2017-12-06 11:43:01 +01:00
sebres
bf6667d4da
better (sane) stop server handling, AsyncServer.stop_communication back-ported to 0.10 (cherry-picked from 0.11);
2017-12-06 01:38:39 +01:00
sebres
6ccaa03e00
action.d/firewallcmd-ipset.conf: extended with actionflush to bulk unban resp. flush ipset
2017-12-06 01:10:56 +01:00
sebres
aa9cefc3f8
proper stop server in the test cases (quit should stop all server-side threads, also if server was not really started);
...
fix-up for run_with_except_hook: avoid very sporadic error "'NoneType' object has no attribute 'exc_info'" (https://bugs.python.org/issue7336 ),
only extremely fast systems are affected ATM (2.x / 3.x), if thread ends nothing is available in .
2017-12-06 01:09:04 +01:00
sebres
2712f72650
Merge remote-tracking branch 'master' into 0.10
2017-12-06 00:09:52 +01:00
Serg G. Brester
ad658a0a95
Merge pull request #1989 from sebres/logging-options
...
New server logging options
2017-12-06 00:07:51 +01:00
Serg G. Brester
f96761927d
Merge pull request #1969 from RaidForums/patch-1
...
Update nginx-limit-req filter.
2017-12-05 23:51:18 +01:00
sebres
cc9ff31c9c
Update ChangeLog: action.d/firewallcmd-ipset.conf: fixed create of set for ipv6 (missing family inet6, gh-1990)
2017-12-05 23:35:34 +01:00
sebres
e384acca5f
action.d/firewallcmd-ipset.conf: fixed create of set for ipv6 (missing family inet6)
2017-12-05 23:34:03 +01:00
Kevin Maradona
6c705d572b
filter.d/nginx-limit-req.conf: nginx limit-req log-level can be set to warn or error therefore having this regex will include both of them.
2017-12-05 22:31:54 +01:00
sebres
55143ce1d9
coverage increase
2017-12-05 19:32:13 +01:00
sebres
f9833ddee4
Update ChangeLog
2017-12-05 18:55:47 +01:00
sebres
1bf6636446
Introduced new parameters for logging within fail2ban-server;
...
Usage `logtarget = target[facility=..., datetime=on|off, format="..."]`:
- `facility` - specify syslog facility (default `daemon`, see https://docs.python.org/2/library/logging.handlers.html#sysloghandler
for the list of facilities);
- `datetime` - add date-time to the message (default on, ignored if `format` specified);
- `format` - specify own format how it will be logged, for example for short-log into STDOUT:
`fail2ban-server -f --logtarget 'stdout[format="%(relativeCreated)5d | %(message)s"]' start`;
Closes gh-1980
2017-12-05 18:54:21 +01:00
sebres
de97dedba0
move extractOptions from JailReader to helpers (common usage server- / client-side);
2017-12-05 17:49:22 +01:00
Serg G. Brester
ff987b60cd
Merge pull request #1988 from sebres/exim-aggressive
...
Exim aggressive
2017-12-05 17:30:10 +01:00
Serg G. Brester
b0ba1aa846
Update ChangeLog
2017-12-05 16:24:04 +01:00
sebres
ffd6b9f6de
jail.conf: extended with new parameter mode for the filters supporting it;
2017-12-05 16:09:18 +01:00
sebres
2b68882502
filter.d/exim.conf: provides mode "aggressive" to ban flood resp. DDOS-similar failures;
...
Closes #1983
2017-12-05 16:07:53 +01:00
sebres
7f89fbc33f
Merge remote-tracking branch 'remotes/gh-upstream/master' into 0.10
2017-12-01 15:53:11 +01:00
Serg G. Brester
f834e7826d
Merge pull request #1979 from peternowee/fix-exim-lowercase-auth
...
Exim failregex: Include lower/mixed case AUTH
2017-12-01 15:22:09 +01:00
Peter Nowee
e4bbaf3d58
Update ChangeLog
2017-12-01 15:01:48 +01:00
Serg G. Brester
f1c89f6631
Merge pull request #1981 from sebres/datedetector-dual-space
...
datedetector: extended default date-patterns (allows extra space between the date and time stamps)
2017-12-01 10:48:00 +01:00
sebres
5547697401
ChangeLog and typo
2017-12-01 10:16:14 +01:00
sebres
2e437937c3
datedetector: extended default date-patterns (allows extra space between the date and time stamps);
...
* introduces 2 new format directives (with corresponding `%Ex` prefix for more precise parsing):
- %k - one- or two-digit number giving the hour of the day (0-23) on a 24-hour clock,
(corresponds %H, but allows space if not zero-padded).
- %l - one- or two-digit number giving the hour of the day (12-11) on a 12-hour clock,
(corresponds %I, but allows space if not zero-padded).
* mysqld-auth test extended to cover new date-format in log.
Closes gh-1639
2017-11-30 17:06:37 +01:00
Serg G. Brester
cbd63d9cd5
added test to cover quoted injecting on AUTH command
2017-11-30 12:45:11 +01:00
Serg G. Brester
4f63180611
Avoid injection using quotes after auth command;
...
Added non-greedy fallback for quoted something (with lookahead simulated possessive greedy catch of non-quoted parts `[^"]*(?=")`).
Note that because host-info's are hereafter (with foreign input in-between), we would not use greedy or non-greedy catch-alls (`.*` or `.*?`) here (preventing performance losses).
2017-11-30 12:32:24 +01:00
Serg G. Brester
f59df2e156
Avoid any injecting on protocol (e. g. tries using camel-case)
...
The phrase "AUTH command used when not advertised" is precise enough as anchor here, so prevent by any foreign-input (any auth protocol error).
2017-11-29 20:55:48 +01:00
Peter Nowee
aa158ac05f
Exim failregex: Include lower/mixed case AUTH
...
When reporting the error `AUTH command used when not advertised`, Exim
starts with `SMTP protocol error in "........."`. Here, Exim logs the
SMTP command as it was provided by the connecting client.
https://github.com/Exim/exim/blob/exim-4_89+fixes/src/src/smtp_in.c#L2850
According to RFC 5321 (SMTP) "[..] a command verb [..] MAY be encoded
in upper case, lower case, or any mixture of upper and lower case with
no impact on its meaning."
https://tools.ietf.org/html/rfc5321#section-2.4
Lower case `auth login` brute-force attempts were seen in the wild and
were not caught by the current failregex.
This commit makes the failregex case-insensitive for the `AUTH`
command, so that lower case (`auth`) or mixed case (`aUtH`) now also
match. The failregex was already case-insensitive for the command
arguments (e.g. `AUTH login` already matched).
2017-11-29 15:14:43 +01:00
SlowRiot
660d57e6ba
updating my email address
2017-11-29 10:43:15 +01:00
sebres
fbf89e8cdd
typo in indent (spaces to tabs)
2017-11-28 16:32:16 +01:00
Serg G. Brester
f917b4346b
Merge pull request #1974 from sebres/nginx-block-map
...
session-related blacklisting via nginx
2017-11-28 16:27:21 +01:00
sebres
55c2a9968a
remove lacking [Init] section check ([Init] section not necessary anymore for actions also);
...
fix sporadic error by shutdown server in with_foreground_server_thread decorator (if shutdown too fast, but end-phase still does not reached the tester-thread);
2017-11-28 16:14:17 +01:00
sebres
b62ab2d51e
ChangeLog updated
2017-11-28 13:46:57 +01:00
sebres
76f2865883
implemented new action "action.d/nginx-block-map.conf", used in order to ban not IP-related tickets via nginx (session blacklisting in nginx-location with map-file);
2017-11-28 13:42:41 +01:00
Serg G. Brester
4fa0f48fa1
Merge pull request #1970 from sebres/fix-gh-1876
...
Fix logging to systemd-journal (gh-1876)
2017-11-27 10:04:38 +01:00
sebres
6db9ae8574
ChangeLog updated
2017-11-26 23:35:11 +01:00
sebres
af0f7e93ce
better handling by start/stop of server in foreground mode;
...
don't call logging.shutdown because part of exit in fail2bancmdline.
2017-11-26 23:06:35 +01:00
sebres
f31195a4fc
added new logtarget "SYSOUT" to log from fail2ban working in foreground as systemd-service (in opposite to "STDOUT" don't log time-stamps).
2017-11-26 23:03:29 +01:00
sebres
100b531aff
travis: add build for python 3.7-dev and switch to newest pypy3.3 in travis
2017-11-24 13:33:20 +01:00
sebres
7bf5980def
no root option if testing within virtualenv (fixed now).
2017-11-24 13:20:19 +01:00
sebres
fa007bfa7c
remove build folder, if created through setup-process in test
2017-11-24 12:57:55 +01:00
sebres
eac80966c5
Fix scripts-root within fail2ban.service (relative install root-base directory).
...
This is amend for e3b061e94b .
Closes gh-1964
2017-11-24 12:54:45 +01:00
sebres
6db8db04f8
Merge branch 'master' into 0.10: fixed test-cases covering dns2ip (IP of www.epfl.ch changed)
2017-11-23 22:46:17 +01:00
sebres
5708b8b90e
fixed test-cases covering dns2ip (IP of www.epfl.ch changed)
2017-11-23 22:42:51 +01:00
sebres
159957ab88
filter.d/sshd.conf: extended failregex for modes "extra"/"aggressive": now finds all possible (also future) forms of "no matching (cipher|mac|MAC|compression method|key exchange method|host key type) found", see "ssherr.c" for all possible SSH_ERR_..._ALG_MATCH errors;
...
obsolete (multi-line buffered) variant extended also.
Closes gh-1943, gh-1944
2017-11-23 22:21:42 +01:00
sebres
7e756da2b9
Merge remote-tracking branch 'remotes/gh-upstream/master' into 0.10
2017-11-06 18:56:31 +01:00
Serg G. Brester
4cd3b2d4c9
Merge pull request #1955 from sebres/fix-initial-config
...
config/paths-*.conf: initial values and normalization
2017-11-06 18:30:13 +01:00
Serg G. Brester
ee80c52430
Update ChangeLog
2017-11-03 14:15:54 +01:00
sebres
eba68a8f37
config/paths-common.conf: Added initial values for syslog_authpriv, syslog_mail in order to avoid errors while parsing/interpolating configuration;
...
Note the systemd-backend does not need the logpath at all;
Some defaults normalized (minimized configs, don't need to overwrite values in distribution-related path if equal).
2017-11-03 14:15:07 +01:00
Serg G. Brester
c06f3c3fb8
Merge pull request #1812 from jpotter/patch-1
...
Replace port imap3 with imap
2017-11-03 14:05:57 +01:00
Serg G. Brester
4d10c615c4
Update ChangeLog
...
typo
2017-11-03 14:05:17 +01:00
Serg G. Brester
8b26fd2778
Update ChangeLog
2017-11-03 14:03:47 +01:00
Serg G. Brester
9876dd44f9
replace port imap3 with imap everywhere, since imap3 is not a standard port and old rarely (if ever) used and missing on some systems
...
(see gh-1942)
2017-11-03 14:03:06 +01:00
Jeff Potter
4a2fc8b7e8
Include imap (port 143) in courier-auth ports
...
imap was missing from the list of ports, preventing fail2ban from blocking connections on standard IMAP port 143.
2017-11-03 14:01:19 +01:00
Serg G. Brester
a87af7bf41
Merge pull request #1948 from itoffshore/alpine
...
gentoo-initd: add descriptions
2017-11-03 13:30:18 +01:00
Stuart Cardall
18d2761dc0
gentoo-initd: add descriptions
...
add descriptions to stop syslog errors for extra_started_commands when running:
rc-service ipset describe
Oct 28 15:13:30 xxxx daemon.warn /etc/init.d/fail2ban[26446]: ^[[1m^[[36mreload^[[m: no description
Oct 28 15:13:30 xxxx daemon.warn /etc/init.d/fail2ban[26447]: ^[[1m^[[36mshowlog^[[m: no description
2017-11-01 22:19:14 +01:00
sebres
b615a98540
jail.conf: avoid overwriting of default value of the parameter chain of several actions (where default chain != INPUT);
...
test-cases extended to cover the same logic (use `<known/chain>` instead of fix value `INPUT`);
Closes gh-1949
2017-10-30 13:32:52 +01:00
Serg G. Brester
e07a8cda07
Update jail.conf
...
Documentation of parameters for action blocklist_de, closes gh-1940
2017-10-27 15:26:17 +02:00
Serg G. Brester
2409c4506a
Merge pull request #1917 from martin61/patch-1
...
add ip6tables.service ipset.service in systemd unit
2017-10-20 12:39:46 +02:00
martin61
5db497017a
add ip6tables.service ipset.service in systemd unit
2017-10-19 16:44:18 +02:00
Serg G. Brester
1a8fb6290d
Merge pull request #1926 from sebres/0.10-pf-actionflush
...
action.d/pf.conf: wildcard anchoring example + bulk-unban with command `actionflush`
2017-10-19 16:35:46 +02:00
sebres
0e66e3cc57
Merge branch 'master' into 0.10
...
# Conflicts:
# config/filter.d/asterisk.conf
2017-10-18 19:00:23 +02:00
Serg G. Brester
0aeb91d1e2
Merge pull request #1929 from miken32/patch-1
...
Remove invalid (vulnerable) regex using IP from foreign input (not the originator).
2017-10-18 18:54:43 +02:00
Serg G. Brester
d81405adbc
Update ChangeLog
...
typo
2017-10-18 18:52:55 +02:00
Serg G. Brester
b6ab0aa83f
Update ChangeLog
...
more detailed entry
2017-10-18 18:52:12 +02:00
Michael Newton
894a05b843
Update ChangeLog
2017-10-18 09:26:51 -07:00
Michael Newton
3f715e8577
Remove tests
2017-10-17 14:46:11 -07:00
Michael Newton
d5d1fe679f
Remove invalid regex
...
Resolves #1927
2017-10-17 14:44:23 -07:00
sebres
a1b863fcf6
action.d/pf.conf: extended with bulk-unban, command actionflush in order to flush all bans at once (by stop jail, resp. shutdown of fail2ban)
2017-10-17 20:12:48 +02:00
sebres
667f48817b
Merge pull request #1925 from sebres/0.10-fix-pf-multiport:
...
action.d/pf.conf: fix multiport syntax
2017-10-17 16:09:50 +02:00
sebres
3c4910a3e2
ChangeLog entry + note for possible incompatibility.
2017-10-17 16:06:39 +02:00
sebres
8726c9fb0a
pf.conf: enclose ports in braces, multiple ports expecting this syntax ... any port {http, https}.
...
Note this would be backwards-incompatible change (for the people already enclosing multiports in braces in jail.local).
closes gh-1915
2017-10-17 13:46:29 +02:00
Serg G. Brester
c6029bbef6
Merge pull request #1919 from IdahoPL/IdahoPL-patch-1
...
Update pf.conf commet to fix syntax error
2017-10-17 12:40:51 +02:00
Łukasz Wąsikowski
a4f94d2619
Update pf.conf
...
Fix comment, because current one won't work:
cat /etc/pf.conf
anchor f2b {
sshd
}
# service pf reload
Reloading pf rules.
/etc/pf.conf:2: syntax error
New version:
cat /etc/pf.conf
anchor f2b {
anchor sshd
}
# service pf reload
Reloading pf rules.
2017-10-17 12:39:25 +02:00
Serg G. Brester
c42dd6941c
Merge pull request #1921 from harry-wood/patch-1
...
typo
2017-10-16 10:50:11 +02:00
Harry Wood
ea1b663f85
typo
...
spell "positive" (...but also somebody should finish this sentence)
2017-10-16 01:15:58 +01:00
sebres
028f32b74b
bump version (0.10.1 -> 0.10.2.dev1)
2017-10-12 14:00:41 +02:00
sebres
351abeb4ff
prepare release: bump version, update ChangeLog, man's and MANIFEST etc.
2017-10-12 13:46:46 +02:00
sebres
ceff489a46
amend to a4459765ef: irrelevant condition removed
2017-10-04 14:24:21 +02:00
sebres
a4459765ef
pyinotify/polling: test filter reaction by delete of watching file, better detection of pending file (avoid errors in fail2ban.log during log-rotation).
...
Closes gh-1865 for filterpyinotify ("cannot remove WD=2").
2017-10-04 14:17:00 +02:00
sebres
e71f16f6ba
Merge branch 'master' into 0.10
...
# Conflicts resolved:
# config/filter.d/dovecot.conf
2017-10-04 09:57:18 +02:00
sebres
ea36e1b3fc
filter.d/dovecot.conf: fixed failregex to recognize pam_authenticate failures with "Permission denied" (gh-1897)
2017-10-04 09:55:37 +02:00
Serg G. Brester
32deb828a1
Merge pull request #1904 from sebres/no-dup-ignoreip-fix-1900
...
Avoid exact duplicates by addIgnoreIP (closes gh-1900)
2017-10-04 08:41:40 +02:00
sebres
d1fad22ac1
Avoid exact duplicates by addIgnoreIP (closes gh-1900)
2017-10-02 15:59:14 +02:00
sebres
8c804a2290
Merge branch 'master' into 0.10
...
# Conflicts resolved:
# config/filter.d/postfix-rbl.conf
# config/filter.d/postfix-sasl.conf
# config/filter.d/postfix.conf
# fail2ban/tests/files/logs/postfix-sasl
2017-10-02 15:41:30 +02:00
sebres
a2120a9de5
filter.d/postfix-*.conf - added optional port regex (closes gh-1902)
2017-10-02 15:31:55 +02:00
Serg G. Brester
6140a0f2d4
Merge pull request #1894 from sbraz/nftables-ipv6
...
Fix nftables actions for IPv6 addresses, fixes #1893
2017-09-13 09:14:39 +02:00
Serg G. Brester
6149df5216
Update ChangeLog
2017-09-12 09:27:16 +02:00
Louis Sautier
152c9d27d5
Fix nftables actions for IPv6 addresses, fixes #1893
...
* add [Init?family=inet6] to nftables-common.conf and make nftable
expressions more modular
* change "ip protocol" to "meta l4proto" in nftables-allports.conf
since the former only works for IPv4
2017-09-11 23:32:53 +02:00
Serg G. Brester
fbd46f29f2
Merge pull request #1891 from sbraz/openrc
...
Fix Gentoo init script's shebang
2017-09-11 12:24:10 +02:00
Serg G. Brester
72ad904f58
Update ChangeLog
2017-09-11 12:22:43 +02:00
Louis Sautier
2ce0ffb977
Fix Gentoo init script's shebang
...
Use openrc-run instead of runscript.
https://github.com/OpenRC/openrc/commit/5d5856c193768d24f11d5f0533e48c39526aef5c
2017-09-11 12:19:33 +02:00
Serg G. Brester
8be4569d51
Update ChangeLog
...
several fixes of 0.10th branch
2017-09-08 11:32:08 +02:00
sebres
b185e7cb04
Merge remote-tracking branch 'upstream/master' into 0.10
2017-09-08 11:11:05 +02:00
Serg G. Brester
983b128c54
Update ChangeLog
...
several fixes of 0.9th branch
2017-09-08 11:07:48 +02:00
Serg G. Brester
5221693ce0
Merge pull request #1889 from sebres/0.10-small-optim-review
...
0.10 small optimization & review, config-reader, pretty-dump, etc.
2017-09-08 10:57:27 +02:00
sebres
462b534469
restrict saving of previous known values to section-related (don't overwrite with the values of other sections, especially like "INCLUDES", etc.)
2017-09-07 20:00:45 +02:00
sebres
e20f6204d3
don't put parameters starting with known/ to the ready stream (intermediate options only), makes streams and dumps of configuration shorter and better readable
2017-09-07 19:32:14 +02:00
sebres
b698a74902
introduces new command-line options --dp, --dump-pretty to dump the configuration using more human readable representation;
...
allow dump of configuration, also if log-file is not available (warning only)
2017-09-07 19:31:38 +02:00
Serg G. Brester
fd83260bd8
jail "pass2allow-ftp" should supply blocktype to action
...
closes gh-1884
2017-09-07 18:51:08 +02:00
Serg G. Brester
bb97e66627
Merge pull request #1882 from coderua/patch-1
...
Add Jorgee Vulnerability Scanner protect
2017-09-07 15:52:31 +02:00
Serg G. Brester
99a9a9136e
Merge pull request #1887 from fail2ban/exim-gh-1886
...
filter.d/exim.conf: fixed failregex for case of flood attempts with `D=0s`
2017-09-07 15:47:20 +02:00
Serg G. Brester
db121a6f85
Update exim
...
Test case covers flood attempts with `D=0s`
2017-09-07 15:32:35 +02:00
Serg G. Brester
2cd02b731b
filter.d/exim.conf: fixed failregex for case of D=0s
...
Closes gh-1886
2017-09-07 15:28:46 +02:00
sebres
4bc226a692
optimized regex
2017-09-05 10:59:16 +02:00
Vladimir Chumak
fafefc0293
Add Jorgee Vulnerability Scanner protect
...
Details for Jorgee Vulnerability Scanner: https://www.symantec.com/security_response/attacksignatures/detail.jsp?asid=30164
2017-09-05 10:56:43 +02:00
sebres
acd9e8155b
Merge pull request #1376 from j-marz/master:
...
Added ZoneMinder filter
2017-09-04 11:52:10 +02:00
sebres
4163f32968
small review, prefix replaced with %(_apache_error_client)s from apache-common.conf include
2017-09-04 11:48:01 +02:00
john
ac95449bbb
changed zoneminder regex as per Sebres and yarikoptic recommendations
2017-09-04 11:37:09 +02:00
john
7013729a1f
removed redundant options for zoneminder from jail.conf
2017-09-04 11:37:05 +02:00
john
5c3a666380
fixed incomplete regex after adding anchors
2017-09-04 11:37:03 +02:00
john
3d45fd2713
implemented yarikoptic's suggestions in fail2ban pull request #1376
2017-09-04 11:37:00 +02:00
john
776d463e92
added missing colon to failJSON
2017-09-04 11:36:58 +02:00
john
4d8ba7b668
fixed test log file
2017-09-04 11:36:55 +02:00
john
44c4496e49
added sample log files
2017-09-04 11:36:53 +02:00
john
08878d22dd
added zoneminder.conf filter
2017-09-04 11:36:50 +02:00
john
a90f6c4ae8
added zoneminder jail and filter
...
# Conflicts:
# config/jail.conf
2017-09-04 11:36:47 +02:00
sebres
c312962029
filter.d/dovecot.conf: partially cherry-pick to 0.9 PR #1880 from sebres/0.10-fix-dovecot-regex ( d926e11a5c)
...
fixed failregex (without new mode aggressive)
2017-09-01 10:57:41 +02:00
Serg G. Brester
d926e11a5c
Merge pull request #1880 from sebres/0.10-fix-dovecot-regex
...
filter.d/dovecot.conf: fixed failregex + new mode aggressive
2017-09-01 10:36:22 +02:00
sebres
2cfc53c08e
remove capturing groups
2017-09-01 10:25:09 +02:00
sebres
9b8563f35e
- fixes regex for message imap-login: Disconnected (auth failed, X attempts) ... has to many variations on additional info after <HOST>,
...
leave it end-anchored because variable part `user=<[^>]*>` (before `<HOST>`) to avoid injecting, but can be safe rewritten using `[^>]*` in opposite to "greedy" `user=<[^>]*>`.
- introduces mode `aggressive` and extends regex for this mode to match:
* no auth attempts (previously removed in gh-601, because of lots of false positives on misconfigured MTAs)
* disconnected before auth was ready
* client didn't finish SASL auth
2017-09-01 09:56:21 +02:00
Serg G. Brester
a287d0a05c
Merge pull request #1872 from kmzby/master
...
Added filter for phpMyAdmin+syslog
2017-08-25 12:22:58 +02:00
Serg G. Brester
569283063b
Merge pull request #1874 from sebres/fix-f2b-setup
...
setup.py: fix several setup facilities
2017-08-25 12:22:31 +02:00
Pavel Mihadyuk
4c1abe1cbf
phpmyadmin-syslog: removed excess file, fixed test, updated failregex
2017-08-23 16:56:18 +03:00
sebres
f451cf34b3
don't check return code by dry-run: returns 256 on some python/setuptool versions.
2017-08-23 13:20:51 +02:00
sebres
e3b061e94b
- files/fail2ban.service renamed as template to files/fail2ban.service.in;
...
- setup process generates `build/fail2ban.service` from `files/fail2ban.service.in` using distribution related bin-path;
- bug-fixing by running setup with option `--dry-run` (note: specify option `--dry-run` before `install`, like `python setup.py --dry-run install`);
- test cases extended to cover dry-run.
2017-08-23 13:01:29 +02:00
Pavel Mihadyuk
d09304b897
phpmyadmin-syslog: added default jail config
2017-08-22 19:00:48 +03:00
Pavel Mihadyuk
41994fcb56
Added filter for phpMyAdmin+syslog (>=4.7.0)
2017-08-22 18:46:40 +03:00
Pavel Mihadyuk
5b4bc2aafd
Added filter for phpMyAdmin+syslog (>=4.7.0). Closes #1713
2017-08-22 18:20:01 +03:00
sebres
1d5fbb95ae
Merge remote-tracking branch 'remotes/gh-upstream/master' into 0.10
2017-08-18 15:44:22 +02:00
Serg G. Brester
124e5587c6
Merge pull request #1869 from sebres/fix-gh-1389
...
action.d/bsd-ipfw.conf: replace not posix-compliant grep option
2017-08-18 15:43:05 +02:00
Serg G. Brester
b0e5efb631
bsd-ipfw.conf: sh-compliant redirect of stderr together with stdout
2017-08-18 15:26:09 +02:00
sebres
3be32adefb
Replace not posix-compliant grep option: fgrep with -q option can cause 141 exit code in some cases (see gh-1389).
2017-08-18 14:37:29 +02:00
sebres
8e6b4346dc
avoid using "ANSI_X3.4-1968" as preferred encoding, if missing environment variables 'LANGUAGE', 'LC_ALL', 'LC_CTYPE', and 'LANG'
...
(especially critical if default value `encoding = auto` configured).
As PoC and coverage (this case fails without this "fix"):
$ env -i PATH="$PATH" bin/fail2ban-testcases --fast --no-network testAddBanInvalidEncoded
2017-08-18 13:41:58 +02:00
Jacques Distler
f84e58e769
Tweaks to action.d/pf.conf
...
Document recent changes.
Add an option to customize the pf block rule (surely, what the user
really wants, here, is "block quick").
2017-08-18 13:31:34 +02:00
sebres
69a6d0e653
amend to 10c0d95401: order in cymru-info can variate on each level,
...
sorted using key=str (otherwise `['nxdomain', u'US'] != ['US', 'nxdomain']` may occur on some python versions).
2017-08-16 21:23:42 +02:00
sebres
a3c6bb601d
Fixes version, causes "UserWarning: Normalizing '0.10.1dev1' to '0.10.1.dev1'" during setup-process.
2017-08-16 20:50:33 +02:00
sebres
72bd666797
Fixes representation of IPAddr (likely the string representation, enclosed in single-quotes).
2017-08-16 20:50:06 +02:00
sebres
10c0d95401
prevent sporadic assert errors on nested lists/dict differ at some level (mostly causes on python 3.4 because of different dict hashing);
...
introduces new test assertion routine `asesertSortedEqual` for comparison regardless elements order (regarding level/nestedOnly arguments).
2017-08-16 20:48:18 +02:00
sebres
33874d6e53
action.d/pf.conf: anchored call arguments combined as <pfctl> parameter;
...
test cases fixed;
2017-08-16 17:51:07 +02:00
Alexander Köppe
f6ccede2f1
Update pf.conf fixing #1863
...
Fix #1863
Introduce own PF anchors for fail2ban rules.
2017-08-16 17:51:05 +02:00
sebres
19e59fff3e
ChangeLog: added incompatibility list (compared to v.0.9)
2017-08-16 15:38:44 +02:00
sebres
08646bc339
Always supply jail name as name parameter (if not specified explicit in the action parameters action[name=...]).
...
Avoid usage of the same chains (etc.) if someone use `action` instead of `banaction` jail parameter.
2017-08-16 13:14:42 +02:00
sebres
e5169d8f84
pyinotify: be sure possible IOError/OSError by remove monitor (log-rotate? normally not raises) are handled properly.
2017-08-16 11:37:22 +02:00
sebres
7867228146
closes part of gh-1865: fixed "Retrieving own IPs of localhost failed: inet_pton() argument 2 must be string, not int"
...
some python-versions resp. host configurations causes returning of integer (instead of ip-string)
2017-08-16 10:45:37 +02:00
sebres
d1de20dd41
Move some ticket-independent tag replacements from ActionInfo to ADD_REPL_TAGS (will be wrapped in replaceTag into calling map).
...
Thus tags `<fq-hostname>` and `<sh-hostname>` could be used without ticket (a. g. in `actionstart` etc.).
Closes gh-1859.
2017-08-14 18:29:36 +02:00
sebres
28076618fd
back to development edition: README.md, ChangeLog, version.py
2017-08-09 17:37:40 +02:00
sebres
c60784540c
version bump: release 0.10.0
2017-08-09 16:53:05 +02:00
sebres
30219b54c4
Merge remote-tracking branch 'remotes/gh-upstream/master' into 0.10
2017-08-09 16:38:29 +02:00
Serg G. Brester
c540217844
Update ChangeLog
...
action.d/cloudflare.conf - Cloudflare API v4 implementation (gh-1651)
2017-08-09 16:34:37 +02:00
Serg G. Brester
c0eb7752a8
Merge pull request #1651 from szepeviktor/patch-9
...
Introduce Cloudflare API v4
2017-08-09 16:28:52 +02:00
Serg G. Brester
2ed8a38eca
Update cloudflare.conf
...
Switch to API v1 to API v4 per default
2017-08-09 16:27:53 +02:00
Serg G. Brester
da7072d40e
Merge pull request #1846 from Chocobozzz/patch-3
...
Fix empty logfile.log in xarf login attack action
2017-08-09 16:21:47 +02:00
sebres
94b163936a
Merge remote-tracking branch 'remotes/gh-upstream/master' into 0.10
...
Removed init section (not needed in filter for 0.10).
# Conflicts:
# config/filter.d/sendmail-reject.conf
2017-08-09 16:16:31 +02:00
Serg G. Brester
af25a9d203
Merge pull request #1566 from opoplawski/journalmatch
...
Add sendmail journalmatch options
2017-08-09 16:14:10 +02:00
Orion Poplawski
84f552881c
Add sendmail journalmatch options
2017-08-09 16:03:34 +02:00
Serg G. Brester
5b7375c614
Merge pull request #1638 from roedie/shorewall-ipv6
...
Add shorewall IPv6 support
2017-08-09 15:54:57 +02:00
Serg G. Brester
9a3716465b
Merge pull request #1750 from sebres/0.10-fix-default-backend
...
fixes default backend handling (as default used value of `%(default/backend)s`...
2017-08-09 15:49:45 +02:00
sebres
7549f44ded
code review: removed unused (unneeded) code, coverage increase...
2017-08-09 15:36:36 +02:00
sebres
6f4fde2c29
Update changelog and man/jail.conf.5
2017-08-08 21:50:38 +02:00
sebres
9a768c19d0
Fixes raw to interpolated value by recursive substitution. Avoid too deeply recursive extended interpolation cross sections (test covered now);
2017-08-08 21:48:50 +02:00
sebres
0782b28460
allow usage of "-" character in the name of sections by extended interpolation (like %(my-section/some-value)s).
2017-08-08 21:13:49 +02:00
sebres
e52f483557
Config reader's: introduced new syntax %(section/option)s, in opposite to extended interpolation of python 3 ${section:option} work with all supported python version in fail2ban and this syntax is like our another features like %(known/option)s, etc.;
...
Variable `default_backend` switched to `%(default/backend)s`, so totally backwards compatible now, but now the setting of parameter `backend` in default section of `jail.local` can overwrite default backend also.
Test cases extended: test targeted section options "section/option" (default and cross sections options);
2017-08-08 20:21:44 +02:00
sebres
5ce8d4f741
fixes default backend handling (as default used value of known/backend, which can now be overridden in default section of jail.local);
...
introduces fallback for `known/option`: interpolate missing `known/option` as `option` from default section
2017-08-08 18:41:15 +02:00
sebres
51c54b3253
ChangeLog entry for 9a42ce12f4
2017-08-08 13:04:36 +02:00
sebres
8f76a052ec
rebuild man's and MANIFEST
2017-08-08 13:00:10 +02:00
sebres
9a42ce12f4
amend to gh-1792: introduced new fail2ban-regex option "--timezone" ("--TZ"), to set time-zone used by convert of time format.
2017-08-08 12:55:13 +02:00
sebres
2fe1479484
Merge branch '_0.9/gh-1849' into 0.10
2017-08-07 18:07:36 +02:00
sebres
5c538fb658
Recognize "unknown user" for additional auth-methods (pam, passwd-file, ldap, sql, etc); simplifying regular expressions (put "unknown user" and "invalid credentials" together as one regex).
2017-08-07 18:04:09 +02:00
sebres
cb0f7ba4b9
Merge amend to PR #1850 : removed greedy catch-all
2017-08-07 15:25:37 +02:00
sebres
0ef5b7c4d4
small amend to gh-1850: removed greedy catch-all at end.
2017-08-07 15:24:16 +02:00
Serg G. Brester
047d516661
Merge pull request #1850 from MarcelWaldvogel/ejabberd-17-06
...
Support ejabberd 17.06 log format
2017-08-07 15:16:34 +02:00
Marcel Waldvogel
ebd1e2c969
Add testcase
2017-07-29 20:05:25 +02:00
Marcel Waldvogel
daf57547c6
Parse ejabberd 17.06 output
...
E.g.:
2017-07-29 08:24:04.773 [info] <0.6668.0>@ejabberd_c2s:handle_auth_failure:433 (http_bind|ejabberd_bosh) Failed c2s PLAIN authentication for test@example.ch from ::FFFF:192.0.2.3: Invalid username or password
2017-07-29 19:58:06 +02:00
Bigard Florian
f4551d02c9
Fix empty logfile.log in xarf login attack action
...
Fix empty 3rd MIME part which contains the attack evidence (logfile.log).
2017-07-25 13:44:29 +02:00
sebres
1a562bed0f
Merge remote-tracking branch 'master' into 0.10
...
# Conflicts:
# config/filter.d/asterisk.conf
2017-07-19 08:57:23 +02:00
Serg G. Brester
babb76cb3c
Merge pull request #1839 from sebres/asterisk-patch
...
Asterisk improvements
2017-07-19 08:50:05 +02:00
sebres
a5b62a7f36
failregex extended and simplified (partially ported from gh-1409).
2017-07-18 16:34:22 +02:00
sebres
098abae4e6
Remove greedy catch-all before <HOST>, make regex more universal, fewer prone to errors (should avoid future changes, if some optional parameters coming again before/after RemoteAddress) + non-captured groups now.
...
Test for possible injection (5.6.7.8 in session-id) already available, line 59 (thus already covered).
2017-07-18 16:09:53 +02:00
sebres
2ea22b9d30
test coverage for gh-1427
2017-07-18 15:46:53 +02:00
Kirill
4c0c7b97c0
Update asterisk.conf to new log message
...
I got an issue like this:
[2016-05-15 22:53:00] SECURITY[26428] res_security_log.c: SecurityEvent="FailedACL",EventTV="2016-05-15T22:53:00.203+0300",Severity="Error",Service="AMI",EventVersion="1",AccountID="admin",SessionID="0x7fb580001518",LocalAddress="IPV4/TCP/0.0.0.0/5038",RemoteAddress="IPV4/TCP/78.129.227.4/62389",SessionTV="1970-01-01T03:00:00.000+0300"
# [sebres] rebased to current master and resolving conflicts.
2017-07-18 15:40:32 +02:00
Serg G. Brester
34cb55fd91
Merge pull request #1695 from benrubson/issue1693
...
Apache, detect syslog prefix
2017-07-14 02:05:23 +02:00
sebres
a12ac4242b
ChangeLog updated
2017-07-12 11:59:42 +02:00
sebres
0e33125129
be more precise using common __prefix_line expression (set _daemon to recognize apache and httpd only)
2017-07-12 11:59:02 +02:00
sebres
b561af45ef
apache-common.conf: introduced parameter logging for possibility to match lines, if apache logs into syslog/systemd journal;
...
added test cases to cover `apache-auth[logging=syslog]`.
2017-07-12 11:45:44 +02:00
benrubson
10cc7e6e59
Apache, detect syslog prefix, add test
2017-07-12 11:39:20 +02:00
benrubson
b662cf03ac
Apache, detect syslog prefix, simple example
2017-07-12 11:36:34 +02:00
Serg G. Brester
6c030c5e10
Merge pull request #1717 from szepeviktor/patch-11
...
Updated xarf-specification repo URL in xarf action
2017-07-12 09:54:15 +02:00
Serg G. Brester
99b668a3cc
Merge pull request #1390 from khumarahn/xxx
...
ensure /var/run/fail2ban is created in systemd service file
2017-07-11 15:53:42 +02:00
Serg G. Brester
4126b16e7c
Merge pull request #1828 from sebres/filter-ejabberd-auth-gh-993
...
Accept new format for filter ejabberd-auth
2017-07-11 15:43:28 +02:00
Serg G. Brester
5dcbcb99b9
Merge pull request #1648 from hlein/master
...
gentoo-initd: wait up to 30 seconds on "stop" to avoid errors.
2017-07-11 15:41:48 +02:00
sebres
c9385a2e04
ChangeLog updated
2017-07-11 15:28:04 +02:00
sebres
7217ef5c9e
filter.d/ejabberd-auth.conf: fixed ejabberd filter - accept new log-format with wait_for_sasl_response instead of wait_for_feature_request + optional part "IP " (gh-993)
2017-07-11 15:25:51 +02:00
Serg G. Brester
ad9f364800
Merge pull request #1827 from sebres/filter-roundcube-fix-gh-1303
...
Filter roundcube: fixed gh-1303 - X-Real-IP or/and X-Forwarded-For after host
2017-07-11 15:21:04 +02:00
sebres
ea3a6aa971
ChangeLog updated
2017-07-11 15:02:59 +02:00
sebres
dae4988aea
filter.d/roundcube-auth.conf: fixes failregex not working with X-Real-IP or/and X-Forwarded-For (gh-1303)
2017-07-11 14:59:24 +02:00
sebres
00456b8270
review: documentation, small enhancement of fail2ban-client to test time abbreviation format:
...
fail2ban-client --str2sec 1d12h30m
2017-07-11 14:03:00 +02:00
sebres
89f2dbb97b
small bug fix (missing - by option --timeout, wrong module reference)
2017-07-11 14:01:42 +02:00
Serg G. Brester
d334a36a60
Merge pull request #1825 from sebres/_0.10/postfix-filter-opti
...
0.10 - postfix filter optimizations
2017-07-11 12:34:56 +02:00
sebres
cf3b8f63f6
coverage fix
2017-07-11 12:16:12 +02:00
sebres
e26cc5de45
restore backwards compatibility (jail postfix-sasl); changelog update
2017-07-11 11:57:48 +02:00
sebres
aa92b68d4a
filter.d/postfix.conf: normalized several postfix-filters using parameter mode (as discussed in gh-1813);
...
introduced parameter `mode`: more (default, combines normal and rbl), auth, normal, rbl, ddos, extra or aggressive (combines all)
replacement for gh-1239, gh-1697, gh-1764; closes gh-1245, gh-1297.
2017-07-10 20:49:28 +02:00
sebres
36d42d7f0b
SampleRegexsFactory: introduce opportunity to supply multiple options combinations (check lines using filters with several options), see for example filter sshd.conf
2017-07-10 19:57:02 +02:00
sebres
d32a3913cf
postfix postscreen (resp. other RBL's compatibility fix) / gh-1764
2017-07-10 15:38:24 +02:00
Serg G. Brester
57ea38c342
Update paths-debian.conf
...
Fixed mail.log path since in the default rsyslog configuration of debians the `mail.warn` is commented now (see `/etc/rsyslog.d/50-default.conf`: `#mail.warn -/var/log/mail.warn`).
Closes gh-1687
2017-07-05 19:57:30 +02:00
sebres
546cd55342
Merge branch 'master' into 0.10
2017-07-03 13:02:25 +02:00
Serg G. Brester
d05d9f4c28
Merge pull request #1816 from sebres/fix-gh-1302
...
filter.d/asterisk.conf - fixed failregex AMI Asterisk authentification failed
2017-07-03 12:59:46 +02:00
sebres
a1d0633e69
filter.d/asterisk.conf - fixed failregex AMI Asterisk authentification failed (see gh-1302):
...
- optional space between NOTICE and pid;
- optional part "Host " before IP-address;
2017-07-03 12:57:28 +02:00
sebres
33fcf8d809
Merge branch 'master' into 0.10
2017-07-03 12:43:48 +02:00
sebres
9f55ed86df
fixed testCymruInfoNxdomain (since cymru does not provide ASN mapping info for "10.0.0.0" anymore)
2017-07-03 12:41:54 +02:00
Serg G. Brester
1307e0a5b9
Merge pull request #1760 from szepeviktor/patch-12
...
Courier may complain about the method only
2017-07-03 12:00:36 +02:00
Serg G. Brester
205edff65d
Merge pull request #1690 from chtheis/master
...
#1689 : Make lowest rule number in action.d/bsd-ipfw.conf configurable
2017-07-01 17:16:50 +02:00
Serg G. Brester
f27e053592
Update bsd-ipfw.conf
...
increased starting rule number (lowest_rule_num = 111)
2017-07-01 17:10:53 +02:00
Serg G. Brester
001c0898d6
Merge branch 'master' into master
2017-06-30 18:07:38 +02:00
Serg G. Brester
6110ba9cc3
filter.d/proftpd.conf: added option journalmatch for systemd backend (closes gh-1613)
2017-06-30 18:00:01 +02:00
sebres
5974b0fb35
amend to merge PR gh-1783: restores lost entry journalmatch for filter.d/roundcube-auth.conf
2017-06-26 11:32:34 +02:00
sebres
37ca4f17c2
filter.d/roundcube-auth.conf: added missing entry journalmatch from original gh-1783.
2017-06-26 11:24:10 +02:00
Serg G. Brester
986dd3107d
Merge branch '0.10' into patch-12
2017-06-19 18:37:28 +02:00
Serg G. Brester
f3ba66d1c6
Merge pull request #1783 from weberhofer/0.10
...
filter.d/roundcube-auth.conf: Fixed failregex when logging errors to journal instead to a local file.
Additionally fixes more complex injections on username.
2017-06-19 18:34:08 +02:00
sebres
9b0f39a17d
ChangeLog updated
2017-06-19 18:12:37 +02:00
sebres
d3ae70beb6
filter.d/roundcube-auth.conf: Use the same filter-file and jail also when logging errors to journal instead to a local file.
...
Additionally fixes more complex injections on username.
2017-06-19 18:12:13 +02:00
Johannes Weberhofer
691c080dc7
Added roundcube authentication filter, new jail and log-examples
2017-06-19 16:52:42 +02:00
Serg G. Brester
3294840c2a
Merge pull request #1801 from jeaye/postfix-updates
...
filter.d/postfix.conf: update to the latest postfix logging format
2017-06-19 16:44:37 +02:00
Serg G. Brester
efeca8fdeb
postfix.conf: removes unneeded end-anchoring like .*$, etc.
...
also removes several dynamic content at end, which are of no avail there.
Additionally normalizes optional part (mail-ID) after reason number.
2017-06-19 16:25:46 +02:00
Serg G. Brester
bb283776d7
Merge pull request #1807 from sebres/fix-gh-1806
...
bug-fix: restoring of tickets from database for jails with persistent ban
2017-06-15 18:42:39 +02:00
sebres
fd32e908e3
fixes restoring of tickets from database for jails with persistent ban (if bantime = -1)
2017-06-15 18:28:37 +02:00
sebres
dcdf677438
Merge remote-tracking branch 'master' into 0.10
2017-06-15 11:49:51 +02:00
Serg G. Brester
d54c40bba5
Merge pull request #1805 from sebres/fix-gh-1790
...
filter.d/apache-overflows.conf: rewritten without end-anchor ($)...
2017-06-15 11:48:45 +02:00
sebres
e1234a5249
ChangeLog update
2017-06-15 11:47:16 +02:00
sebres
2b358bc1a4
filter.d/apache-overflows.conf: rewritten without end-anchor ($), because apache-log could contain very long URLs (and/or referrer), the parsing of it anchored way may be very vulnerable (at least as regards the system resources, see gh-1790).
2017-06-15 11:16:19 +02:00
jeaye
6f3d425c4d
Update postfix filters and tests
2017-06-12 18:56:19 -07:00
sebres
bbea73d79d
Merge remote-tracking branch 'remotes/gh-upstream/master' into 0.10
2017-06-12 13:11:45 +02:00
Serg G. Brester
1e5e0722f3
Merge pull request #1792 from gracinet/1773_logtimezone
...
New logtimezone jail option, zone abbreviations, new date-pattern tokens %Exz, %ExZ
2017-06-12 12:32:44 +02:00
Serg G. Brester
23c2d05250
Update changelog (new enhancements from gh-1792)
2017-06-09 20:51:28 +02:00
Georges Racinet
12259bb3c7
man and ChangeLog for logtimezone
2017-06-09 20:39:03 +02:00
sebres
030f89bf7a
Implemented zone abbreviations (DST, etc.) and abbr+-offset functionality (accept zones like 'CET+0100'), for the list of abbreviations see strptime.TZ_STR;
...
Tokens `%z` and `%Z` are more precise now;
Introduced new tokens `%Exz` and `%ExZ` that fully support zone abbreviations and/or offset-based zones;
# TODO: because python currently does not support mixing of case-sensitive with case-insensitive matching,
# check how TZ (in uppercase) can be combined with %a/%b etc. (that are currently case-insensitive),
# to avoid invalid date-time recognition in strings like '11-Aug-2013 03:36:11.372 error ...'
# with wrong TZ "error", which is at least not backwards compatible.
# Hence %z currently match literal Z|UTC|GMT only (and offset-based), and %Exz - all zone abbreviations.
2017-06-09 20:29:34 +02:00
sebres
39c4acf6bd
small amend white-spaces (no functional changes) + a bit optimized zone2offset
2017-06-09 15:52:14 +02:00
sebres
9f41d1e381
Normalize zone2offset (usable within reGroupDictStrptime), tests simplified and extended with more cases (covers precedence of input-zone over default, etc.)
2017-06-09 14:55:44 +02:00
sebres
8cb4ae0242
Code review and small optimizations, prepared to provide offset-based time zones for date-detectors (parsing of input-string)
2017-06-09 13:55:30 +02:00
Serg G. Brester
d56554ecf3
Merge pull request #1688 from felixonmars/arch-config
...
Add a path configuration for Arch Linux
2017-06-06 10:55:13 +02:00
Serg G. Brester
5482e0bbe7
Merge pull request #1794 from szepeviktor/patch-15
...
fixed grep pattern: escape dot-char in search-IP and more restrictive boundaries (IPv6-capability)
2017-05-31 19:05:43 +02:00
Serg G. Brester
08591a52a4
Merge pull request #1796 from peternowee/fix-dovecot-empty-user
...
dovecot: revert `<[^>]+>` back to `<[^>]*>` - allows empty user again [mistakenly changed in 5678d08 ]
2017-05-31 19:03:34 +02:00
Peter Nowee
b93e47b12f
dovecot: Match also when user field is empty
...
Commit 5678d08 of 2016-11-26 changed:
( user=<\S*>,)?
to:
( user=<[^>]+>,)?
The change from `*` (zero or more times) to `+` (one or more times) may
not have been intended. It will miss lines containing, for example:
Aborted login (tried to use disallowed plaintext auth): user=<>
This commit reverts the `+` back to `*`.
2017-05-31 15:54:30 +02:00
Serg G. Brester
5214c1c5d1
Update changelog (gh-1455)
2017-05-30 20:31:48 +02:00
Marcel Bischoff
228d25c548
Update Kerio Connect filter ( #1455 )
...
* Update Kerio Connect filter
Fixed regex for some log entries that did not get recognized and some additional error formats are added.
* Add missing colon, GitHub address
* Add filter tests
* Add missing test
2017-05-30 20:27:44 +02:00
Serg G. Brester
80cc47b75f
Update helpers-common.conf
...
fixed grep pattern: escape dot-char in search-IP and more restrictive boundaries (IPv6-capable)
2017-05-30 09:14:43 +02:00
Viktor Szépe
5bb6be0163
IPv6 address may overlap
2017-05-30 02:05:38 +02:00
Georges Racinet
e8f2173904
New logtimezone jail option
...
This new option allows to force the time zone on log lines
that don't bear a time zone indication (GitHub issue #1773 ), so it behaves
actually with respect to log line contents as a default time zone.
For the time being, only fixed offset timezones (UTC or UTC[+-]hhmm) are
supported, but the implementation is designed to later on treat the case
of logical timezones with DST, e.g., Europe/Paris etc.
In particular, the timezone name gets passed all the way to the strptime
module, and the resulting offset is computed for the given log line, even
though for now, it doesn't actually depend on it.
Also, the DateTemplate subclass gets to choose whether to use it or not.
For instance, it doesn't make sense to apply a time zone offset to
Unix timestamps.
The drawback is to introduce an API change for DateTemplate. I hope it's
internal enough for that not being a problem.
2017-05-23 17:39:37 +02:00
sebres
2b08847f3a
Reintegrate 'master' into 0.10 (merge point) + small code review
2017-05-19 16:32:13 +02:00
sebres
c7ddf1f940
[systemd-backend] implicit closing journal descriptor by stop filter.
...
Partially cherry-picked from 0.10 (d153555a07 )
2017-05-19 15:36:06 +02:00
sebres
ae0f0d2ec0
Merge branch 'fix-pyinotify-dir-rotate' into 0.10
2017-05-19 13:39:19 +02:00
sebres
96c3b06abb
amend to #1778 : repair notifier wait-cycle (too long timeout in polling, too late check for pending files, too long stop)
2017-05-19 13:26:16 +02:00
sebres
9b83a3128d
code review, try to increase coverage
2017-05-17 12:23:28 +02:00
Serg G. Brester
17b0945a70
Update ChangeLog
2017-05-16 09:43:52 +02:00
Serg G. Brester
a73b0c0064
Merge pull request #1778 from sebres/fix-pyinotify-dir-rotate
...
Fix pyinotify directory-based log-rotate
2017-05-16 09:41:09 +02:00
sebres
050076ae42
code review + coverage fixes
2017-05-15 19:05:40 +02:00
sebres
62e580b7cf
pyinotify: switch from ThreadedNotifier to Notifier:
...
- Filter instance is already a thread;
- avoid stop pyinotify processing if an interim error occurs (and breaks main-loop, e. g. during multi-threaded processing by add/remove log-files)
2017-05-15 18:47:00 +02:00
sebres
c258bb4a6a
Merge branch '0.10' into fix-pyinotify-dir-rotate
2017-05-15 16:50:17 +02:00
sebres
94c793ff89
Merge branch 'master' into 0.10
2017-05-15 16:48:11 +02:00
sebres
0a707d0302
Merge branch 'travis-fix-pypy'
2017-05-15 16:41:22 +02:00
sebres
f099558bcf
try to fix travis build for pypy3 (after switch to 'pypy3.3-5.2-alpha1' the test cases seems to never run anymore).
2017-05-15 16:32:41 +02:00
sebres
16a84ca0b5
code review
2017-05-15 15:20:43 +02:00
Filippo Tessarotto
ff1c6718da
Postfix RBL: 554 & SMTP
...
Cherry-pick of 607568f5da (see gh-1686)
2017-05-15 14:42:37 +02:00
sebres
5c1d01bf58
code review, try to make recognition of pending files fewer sporadic (error prone)
2017-05-15 14:31:50 +02:00
sebres
9841fe52c3
fixed cleanup for Gamin backend (by interim stop in the test-cases)
2017-05-15 12:52:16 +02:00
sebres
7b614a7a15
differentiate between watched directories and files (refreshing monitoring of files/dirs expected different flags for watcher)
2017-05-15 12:38:48 +02:00
sebres
e340d0d2b2
Fixed detection of directory-based log-rotation of pyinotify backend.
...
If directory moved and the target is not watched path, so the monitoring of it could not be continued.
Now fixed with pending files await a monitoring if there (resp. its directories) appears again (respawn).
Closes gh-1769
2017-05-12 16:51:08 +02:00
Yaroslav Halchenko
407b2ea936
life is going on
2017-05-11 11:17:27 -04:00
Yaroslav Halchenko
bc60d6feb6
Merge remote-tracking branch 'origin/master'
...
* origin/master:
exim test cases extended: cover short form of the logging (without session-id, gh-1771)
2017-05-11 11:13:07 -04:00
sebres
31627b796b
Merge branch 'master' into 0.10
2017-05-11 09:14:52 +02:00
sebres
a5cdb9c977
exim test cases extended: cover short form of the logging (without session-id, gh-1771)
2017-05-11 09:10:45 +02:00
Yaroslav Halchenko
35280044ff
Preparing for 0.9.7 release
2017-05-10 21:38:57 -04:00
Yaroslav Halchenko
663d526d74
Added newly added files to MANIFEST
2017-05-10 21:31:09 -04:00
Serg G. Brester
c43a3ac1cd
Merge pull request #1770 from tjikkun/double_lock
...
resolves deadlock (dual lock) by SYSLOG logging type
2017-05-08 14:56:39 +02:00
Sander Hoentjen
2a4dafce5b
don't call setLogTarget from setSyslogSocket when holding the lock
...
If we do, setLogTarget will wait for the lock, but it will never be released
2017-05-08 14:11:07 +02:00
sebres
b13d9d4e22
Merge branch 'master' into 0.10
2017-05-07 21:29:12 +02:00
sebres
bea3a62a37
update ChangeLog
2017-05-07 14:02:45 +02:00
sebres
0600d51511
filter.d/exim.conf: added new reason for "rejected RCPT" regex: Unrouteable address
2017-05-07 14:02:38 +02:00
sebres
49e237209e
Merge branch 'master' into 0.10
2017-05-07 13:32:12 +02:00
sebres
3d64d705f3
try to fix travis integration of pypy3: setuptools recently dropped support for Python 3.0 - 3.2, but old pypy3 based on Python 3.2.5
2017-05-07 13:28:35 +02:00
sebres
c546f85207
filter.d/exim.conf: cherry-picked from 0.10, match complex time like D=2m42s (closes gh-1766)
2017-05-07 13:02:32 +02:00
Serg G. Brester
b5d59e8883
small fix of changelog entry
2017-05-02 16:59:05 +02:00
Viktor Szépe
eb5c75e4b5
Add test to Courier auth
2017-04-29 17:12:15 +02:00
Viktor Szépe
1ed958521c
Courier auth changelog
2017-04-28 17:08:36 +02:00
Viktor Szépe
ac256a822b
Make courier-auth regexp a non-captured group
2017-04-28 16:58:24 +02:00
Viktor Szépe
4bb8a58dcf
Courier may complain about the method only
...
> Mar 30 22:29:18 szerver imapd-ssl: LOGIN FAILED, method=PLAIN, ip=[::ffff:1.2.3.4]
2017-04-28 15:49:59 +02:00
Seth Reeser
c3426ba5f6
Update botsearch-common.conf ( #1759 )
...
* Update botsearch-common.conf, apache-modsecurity.conf: typo and missing new-line
2017-04-26 20:14:39 +02:00
sebres
8839bcbb09
Merge remote-tracking branch master into 0.10
2017-04-25 10:07:19 +02:00
Serg G. Brester
fafe11d326
Merge pull request #1757 from sebres/0.9-fix-gh-1751
...
filter.d/exim.conf: optional part `(...)` by authenticator failed for ...
2017-04-25 10:05:27 +02:00
sebres
462442a517
Update ChangeLog #1757
2017-04-25 10:04:45 +02:00
Serg G. Brester
e7d51d1969
Merge pull request #1758 from sebres/0.10-new-hostname-tags
...
0.10 new action tags: <fq-hostname>, <sh-hostname>
2017-04-25 09:59:26 +02:00
sebres
e4ccbe7286
code review: getHostname can return ''
2017-04-24 21:32:40 +02:00
sebres
f75c3d8a02
code review and ChangeLog entry
2017-04-24 21:18:16 +02:00
sebres
db16b4c22a
testComplexMailActionMultiLog: better echo mock-up replacement for "...) | mail -s ..."
2017-04-24 21:18:14 +02:00
sebres
99344d28c8
Introduces new tags with hostname:
...
- `<fq-hostname>` - fully-qualified name of host (the same as `$(hostname -f)`)
- `<sh-hostname>` - short hostname (the same as `$(uname -n)`)
Execution of `uname -n` replaced in all mail actions with most interesting fully-qualified `<fq-hostname>`.
2017-04-24 21:17:55 +02:00
sebres
3161bcf78b
filter.d/exim.conf: optional part (...) after host-name before [IP], normalized over whole config file.
...
# Conflicts:
# config/filter.d/exim.conf
2017-04-24 19:21:26 +02:00
sebres
507034c5be
filter.d/apache-auth.conf: joined some similar expressions
2017-04-24 15:32:44 +02:00
Serg G. Brester
e35ed1cdf7
Update ChangeLog
...
Changes of #1645
2017-04-21 11:24:32 +02:00
Serg G. Brester
6dfd080e20
Update apache-auth.conf
...
remove forgotten referer, that may prevent failure recognition (belongs to gh-1645)
2017-04-21 11:17:13 +02:00
Serg G. Brester
dffda63d59
Merge pull request #1645 from benrubson/issue1644
...
Apache URIs can contain spaces
2017-04-21 10:47:12 +02:00
Serg G. Brester
311f8fea83
Merge branch '0.10' into issue1644
2017-04-21 10:32:29 +02:00
sebres
efd6fff7a0
Merge remote-tracking branch 'remotes/gh-upstream/master' into 0.10
...
# Conflicts:
# fail2ban/tests/utils.py
2017-04-20 21:54:56 +02:00
Serg G. Brester
17922b621c
Update ChangeLog
...
replaced german in entry ;)
2017-04-20 15:23:59 +02:00
Yaroslav Halchenko
a0cf31903d
Merge pull request #1754 from yarikoptic/bf-tzdata
...
BF: specify explicit time offset not a time zone name to avoid needing tzdata during testing
2017-04-17 10:26:37 -04:00
Paul Brook
a639f0b083
BF: specify explicit time offset not a time zone name to avoid needing tzdata during testing
2017-04-16 12:11:05 -04:00
Serg G. Brester
36814c4274
Merge pull request #1749 from petervanderdoes/bugfix/problem_with_mail_command
...
Parameter `-s` is already a part of `mailcmd` interpolation
2017-04-11 20:57:42 +02:00
Peter van der Does
bb79e7f413
Parameter not needed
...
The parameter '-s' causes an error as the <mailcmd> already has the parameter.
2017-04-11 11:13:58 -04:00
Serg G. Brester
61e73b9694
Merge pull request #1746 from gracinet/0.10-haproxy-ipv6
...
haproxy-http-auth IPv6 (Closes #1745 )
2017-04-11 10:04:16 +02:00
Serg G. Brester
4f0f22702a
Update haproxy-http-auth.conf
...
little bit more precise expression
2017-04-11 09:11:08 +02:00
Georges Racinet
07023436ac
haproxy-http-auth: added a test for IPv4-mapped-in-IPv6
...
This what one gets in logis if haproxy is binding to ::
on a dual-stack system.
2017-04-07 14:04:13 +02:00
Georges Racinet
4fc6323ff0
haproxy-http-auth: avoid port number in IPv6 addresses
...
The solution taken is to consume the port number explicitely in
the regexp.
2017-04-07 13:59:22 +02:00
Serg G. Brester
e7f1fc5cb3
Update ChangeLog
...
enhancements of #1743
2017-03-31 10:39:50 +02:00
Serg G. Brester
e63af0aa4e
Merge pull request #1743 from sebres/0.10-flush-bulk-unban
...
0.10 - flush resp. bulk unban
2017-03-31 10:36:05 +02:00
sebres
97e8b42d34
dummy action extended with more examples and test-covered now
2017-03-30 13:02:37 +02:00
sebres
042a060a54
additionally complex test-case coverage for actionflush inside server via actions-mechanism of fail2ban - reload with removing action, unban all, stopping of jails and actions, etc.
2017-03-29 23:24:13 +02:00
sebres
d03872fbbf
bulk unban: add new command actionflush default for several iptables/iptables-ipset actions (and common include):
...
iptables-common
iptables
iptables-allports
iptables-multiport-log
iptables-multiport
iptables-new
iptables-ipset-proto4
iptables-ipset-proto6
iptables-ipset-proto6-allports
executing `actionflush` command covered for this actions now
2017-03-29 23:24:11 +02:00
sebres
a1e9cc552c
bulk unban: introduced new command actionflush: executed in order to flush all bans at once (e. g. by unban all, reload with removing action, stop, shutdown the system);
...
the actions having `actionflush` do not execute `actionunban` for each single ticket
2017-03-29 23:24:09 +02:00
Serg G. Brester
44a26c6159
Update ChangeLog
...
amend to gh-1742
2017-03-29 23:14:33 +02:00
Serg G. Brester
4dcdcc3002
Merge pull request #1742 from sebres/0.10-actionstart-on-demand
...
0.10 - Execution of `actionstart` on demand (fixes gh-1741)
2017-03-29 23:07:03 +02:00
sebres
daa13eb5dd
no cover for unreachable and abstract
2017-03-29 18:33:33 +02:00
sebres
ca18270beb
fix artificial test cases ('family' becomes mandatory in the action info, but dict was supplied in the test case)
2017-03-29 18:02:21 +02:00
sebres
8bf79fa483
implemented execution of actionstart on demand, if action depends on family (closes gh-1741);
...
new action parameter "actionstart_on_demand" (bool) can be set to prevent/allow starting action on demand (default retrieved automatically, if some conditional parameter `param?family=...` presents in action properties);
2017-03-29 17:44:15 +02:00
Serg G. Brester
05f5c6efcc
Update README.md
...
added wiki-reference;
fixed mail-representation (after github swiched markdown syntax)
2017-03-29 12:32:34 +02:00
Serg G. Brester
1a59a5c5a7
Merge pull request #1740 from sebres/0.10-strptime-perf
...
strptime.py: small code review and performance optimization
2017-03-29 11:33:57 +02:00
sebres
ee3c9fcb75
"%y" - in the fail2ban parsed year without century should be always relative current century (>= 2000);
...
cover several format specifiers and different "assume" cases (without year, without date, greater as now, etc.);
2017-03-28 22:10:29 +02:00
sebres
7437fbd75b
strptime.py: small code review and performance optimization (get some properties on demand, etc.)
2017-03-28 20:21:39 +02:00
Serg G. Brester
ec19aed489
Merge pull request #1739 from gracinet/0.10-test_smtp-no-network
...
Fixes test_smtp connects to wrong inet (if listening on ::1 instead of 127.0.0.1)
2017-03-28 19:49:58 +02:00
Georges Racinet
7b93f111e1
test_smtp inconsistency for py3+IPv6
...
It appears that, under Python3, on an IPv6 enabled machine,
the testing SMTP server on 'localhost' can turn out to listen on ::1 only,
which makes those tests break if the SMTP client part uses 127.0.0.1
directly. Using 'localhost' there as well makes the tests pass.
2017-03-28 19:29:45 +02:00
sebres
873f97c6c5
Merge branch '0.9-log-level-msg' into 0.10
2017-03-27 11:36:36 +02:00
sebres
7982d1e627
Update ChangeLog
2017-03-27 11:31:41 +02:00
sebres
e8596cfce7
amend resp. restore of change from 59c35bc44a (gh-129):
...
- logging of "Log rotation detected" with new MSG level
- introduces new log-level MSG (as INFO-2, 18)
2017-03-27 11:27:41 +02:00
Serg G. Brester
d26060ead0
Update ChangeLog
...
belongs to #1733
2017-03-27 09:38:53 +02:00
Serg G. Brester
cea8ba7831
Merge pull request #1733 from sebres/0.10-repl-skiplines
...
Normalizes replacement of `<SKIPLINES>` + no multiline failregex per default
2017-03-27 09:34:08 +02:00
Seth Reeser
c82495353f
Update mysqld-auth.conf ( #1725 )
2017-03-24 19:03:20 +01:00
Serg G. Brester
52c1950371
Update mysqld-auth.conf
...
small typo, closes gh-1725 (Thx @seth-reeser)
2017-03-24 19:03:17 +01:00
sebres
6ac5c55edc
the sequence in args-dict is currently undefined (so can be 1st argument with ? instead of &)
2017-03-24 17:35:41 +01:00
sebres
990d9a66da
fail2ban-regex: fixed matched output by multi-line (buffered) parsing + and multi-line debuggex URL;
...
test coverage extended;
2017-03-24 17:07:21 +01:00
sebres
bc888e0753
Regex compiled in multi-line parsing mode only if maxlines > 1 (buffering), if however expected - prefix (?m) could be used in regex to enable it;
...
Removed warning "Mutliline regex set for jail ... but maxlines not greater than 1", because can be expected situation now:
non multi-line entry from systemd-filter containing new-lines (that should be ignored by anchors resp. entry parsed as single string);
small code review;
2017-03-24 13:20:04 +01:00
sebres
61c1bdfe79
Normalizes replacement of <SKIPLINES> (moved to _resolveHostTag, so will be replaced together with another tags);
...
Regex will be compiled as MULTILINE only if needed (buffering with `maxlines` > 1), that enables:
- improve performance by the single line parsing;
- make regex more precise (because distinguish between anchors `^`/`$` for the begin/end of string and the new-line character '\n', e. g. if coming from filters (like systemd journal) that allow the parsing of log-entries contain new-line chars (as single entry);
2017-03-24 11:25:12 +01:00
Serg G. Brester
b650503f00
Merge pull request #1732 from sebres/0.10-ignoreself
...
0.10 `ignoreself` for ignore own IP addresses
2017-03-24 10:12:23 +01:00
sebres
e7052e9625
update man/jail.conf.5 (docu for the ignoreself)
2017-03-24 09:55:20 +01:00
sebres
30352c5f03
fix sporadic coverage changes (sometimes produces "no such process" in popen.poll after terminate/kill in timeout test cases)
2017-03-23 17:48:52 +01:00
sebres
663bc9903d
increase coverage (was decreased since "ignoreip" was set to default empty)
2017-03-23 16:19:21 +01:00
sebres
6c4b1c7204
Update ChangeLog
2017-03-23 15:54:53 +01:00
sebres
5e93bf9bd3
Introduced new option "ignoreself", specifies whether the local resp. own IP addresses should be ignored (default is true).
...
Fail2ban will not ban a host which matches such addresses.
Option "ignoreip" affects additionally to "ignoreself" and don't need to include the DNS resp. IPs of the host self.
2017-03-23 15:52:31 +01:00
Serg G. Brester
1e6787877a
Merge pull request #1726 from sebres/0.10-grave-fix-escape-tags-1st
...
0.10 fix escape tags
2017-03-21 15:33:00 +01:00
sebres
6ba0546824
code review and inline docu
2017-03-21 14:53:33 +01:00
Serg G. Brester
7a03c964c2
Update ChangeLog
2017-03-21 14:04:18 +01:00
sebres
bb9541b7a9
Merge pull request #1728 from sebres/_0.10/fix-gh-1719
2017-03-21 11:05:15 +01:00
sebres
43d2cae8da
small amend that correct log trace output by forget MLFID (outputs the reason why it was forgotten - close, disconnect, etc.)
2017-03-21 10:39:55 +01:00
sebres
b6886f2e51
SampleRegexsFactory extended with optional filter constraint, if testing the same log-file with multiple filters (no possibility to match by the old sshd-filter 'zzz-sshd-obsolete-multiline')
2017-03-21 09:42:27 +01:00
sebres
1971fd4bd3
don't remove MLFID from cache (can recognize multiple attempt within the same connection)
2017-03-21 09:20:56 +01:00
sebres
f13fac5ae9
amend to 5561423be3: fixed incorrect failure counting despite the <F-NOFAIL> marked regex;
...
extra: introduced new tag `<F-MLFFORGET>` as mark to forget current multi-line MLFID (e. g. connection closed);
Closes gh-1727
2017-03-21 00:15:57 +01:00
sebres
32f3c1dbf3
test coverage
2017-03-20 13:34:42 +01:00
sebres
57e9c25449
bug fix in the config readers: mixing with the init section should affect only own init options (from init section only bypass default section);
...
the situation details:
value of "_daemon" from default section "default" (with init section) falsely overwrites it from definition section "test" -
the resulting value of "_daemon" should be "test" in all 3 resulting failregex's (as specified in test.local),
fixed and covered now;
additionally more complex cases covered also (all filter parameters in jail via "%(known/...)s", dynamical interpolation across all, etc);
2017-03-20 12:10:09 +01:00
sebres
4f1473724b
fixed grave vulnerability by wrong escape of tags by executing of shell actions
2017-03-20 12:09:42 +01:00
sebres
e5c9f9ec1c
[interim commit] try to fix possible escape vulnerability in actions
2017-03-20 12:08:14 +01:00
sebres
93ec9e01d4
fixes a small blemish by output in beautifier;
...
command "unban" returns a count of tickets that were flushed
2017-03-17 11:00:54 +01:00
Serg G. Brester
da808fe67b
Merge pull request #1720 from sebres/_0.10/fix-gh-1719
...
fix gh-1719: sshd format changed
2017-03-15 18:36:35 +01:00
sebres
5561423be3
filter.d/sshd.conf: fixed failregex format - some parts are optional, new ddos more precise rule (Connection reset by with host entry);
...
closes gh-1719
2017-03-15 18:01:20 +01:00
sebres
97d417926d
repairs testing of missing samples for all regex after filter settings (mode) changed
2017-03-15 18:01:18 +01:00
Viktor Szépe
d79267c424
Updated xarf-specification repo URL in xarf action
2017-03-14 20:47:31 +01:00
sebres
482e5265d7
output execution time of each test case if verbosity > 2
2017-03-14 13:34:54 +01:00
Serg G. Brester
77229a65b5
Merge pull request #1716 from sebres/fix-stop-replace-in-callable
...
Prohibit recursive replacement of action info (calling map)
2017-03-13 23:46:52 +01:00
sebres
ccfd1ccb2d
code review, increase coverage, etc.
2017-03-13 21:56:06 +01:00
sebres
5030e3a122
[Important] Prohibit replacement of recursive "tags" in the action info resp. calling map (very bad idea to do this):
...
- the calling map contains normally dynamic values only (no recursive tags);
- recursive replacement can be vulnerable, because can contain foreign (user) input captured from log (will be replaced in the shell arguments);
2017-03-13 20:45:35 +01:00
sebres
c1da6611ec
[BF] prevents always converting of calling map items in replaceTag (without direct access of item):
...
substituteRecursiveTags: ignore replacing callable items from calling map - should be converted on demand only (by get)
2017-03-13 18:47:26 +01:00
sebres
92d83274d9
fixes cache overload in the test cases (increase max count and max time of CACHE_ipToName - too many entries in mock-up preset, longer time testing)
2017-03-13 18:03:37 +01:00
Serg G. Brester
3fec546fc0
Merge pull request #1715 from sebres/fix-f2b-regex-debuggex-url
...
fail2ban-regex debuggex url fix
2017-03-13 16:37:57 +01:00
sebres
295f7b88c9
increase coverage
2017-03-13 16:21:03 +01:00
sebres
3cba2310ff
Fixes debuggex URL (tag replacement) and missing line stat by matched lines (without time - matched_lines_timeextracted);
...
Closes gh-1394
2017-03-13 16:14:06 +01:00
Serg G. Brester
1bcde678c6
Merge pull request #1710 from sebres/0.10-test-with-filter-options
...
0.10 filter options extension
2017-03-13 02:11:48 +01:00
sebres
30b53bb2ce
update ChangeLog and man/fail2ban-regex.1
2017-03-13 02:07:14 +01:00
sebres
eb3623e90c
configreader.py: correct reading real relative path (starting with "./");
...
fail2ban-regex: catch read exceptions by wrong config files (raise exception in verbose mode only);
2017-03-12 19:04:45 +01:00
sebres
6a26602ba8
allow to use filter options by fail2ban-regex, example:
...
fail2ban-regex text.log "sshd[mode=aggressive]"
2017-03-11 00:06:29 +01:00
sebres
8af7a73bfc
update ChangeLog
2017-03-10 22:14:39 +01:00
sebres
0c1707afda
filter.d/sshd.conf:
...
- optional parameter `mode` rewritten: normal (default), ddos, extra or aggressive (combines all), see sshd for regex details);
test cases reformatted (since "filterOptions", we don't need multiple test log-files anymore);
2017-03-10 22:09:11 +01:00
sebres
7e442c5b27
filter.d/sendmail-reject.conf:
...
- rewritten using `prefregex` and used MLFID-related multi-line parsing (by using tag `<F-MLFID>` instead of buffering with `maxlines`);
- optional parameter `mode` introduced: normal (default), extra or aggressive (see sendmail-reject for regex details);
test cases extended
2017-03-10 21:44:19 +01:00
sebres
a683e88a74
samples test case factory extended with filter options - dict in JSON to control filter options (e. g. mode, etc.):
...
# filterOptions: {"mode": "aggressive"}
2017-03-10 20:39:09 +01:00
sebres
52ed6597b2
Merge remote-tracking branch 'remotes/gh-upstream/master' into 0.10
2017-03-09 16:27:14 +01:00
Serg G. Brester
d3b644acae
Merge pull request #1708 from sebres/fix-gh-1707
...
filter.d/cyrus-imap.conf: accept entries without login-info resp. hostname before IP address (gh-1707)
2017-03-09 16:26:06 +01:00
sebres
0f8cb1749f
Update ChangeLog
2017-03-09 16:15:45 +01:00
sebres
8768776d68
filter.d/cyrus-imap.conf: fixed failregex - accept entries without login-info resp. hostname before IP address
2017-03-09 16:13:45 +01:00
Serg G. Brester
d042981954
Merge pull request #1655 from ajcollett/0.10
...
Added config for AbuseIPDB
2017-03-09 15:15:26 +01:00
Serg G. Brester
b1f5ac9484
Update abuseipdb.conf
2017-03-09 13:33:11 +01:00
Serg G. Brester
62fa02241f
Update jail.conf
2017-03-09 13:31:40 +01:00
Serg G. Brester
e71f3d595f
Merge pull request #1705 from sebres/0.10-tag-ip-host
...
New actions tag `<ip-host>` introduced: can be used in actions to retrieve the host name (dns) from the IP address
2017-03-09 13:11:57 +01:00
sebres
6a2c95da95
action.d/sendmail-geoip-lines.conf fixed using new tag <ip-host> (dns-cache and without external command execution);
...
changelog updated;
2017-03-08 16:51:08 +01:00
sebres
59cf761129
Real action info instead of calling map in test cases, covering of the new tag '<ip-host>';
...
dns lookup: pre-caching within test cases - prevent slow dns-resolving and failures if no-network, of if some IP addresses will be changed later
2017-03-08 16:51:06 +01:00
sebres
a0bb51ef92
New tag '<ip-host>' introduced: can be used in actions to retrieve the host name (dns) from the IP address
2017-03-08 16:51:05 +01:00
sebres
b832b77e3c
small amendment for test-coverage;
...
dynamical monitor failures test classes get proper names running in python3.x (wrong __qualname__)
2017-03-01 14:52:51 +01:00
Serg G. Brester
32ac383d06
Update ChangeLog
2017-02-27 15:51:33 +01:00
Serg G. Brester
81129f0e5c
Merge pull request #1698 from sebres/0.10-filter-captures-to-actions
...
0.10 filter captures to actions
2017-02-27 15:29:57 +01:00
sebres
e4a265c75f
test coverage
2017-02-24 13:22:15 +01:00
sebres
d2a3d093c6
rewritten CallingMap: performance optimized, immutable, self-referencing, template possibility (used in new ActionInfo objects);
...
new ActionInfo handling: saves content between actions, without interim copying (save original on demand, recoverable via reset);
test cases extended
2017-02-24 11:54:24 +01:00
sebres
4efcc29384
coverage of new multi-line handling within fail2ban-regex
2017-02-22 22:20:19 +01:00
sebres
35efca5941
Better multi-line handling introduced: single-line parsing with caching of needed failure information to process in further lines.
...
Many times faster and fewer CPU-hungry because of parsing with `maxlines=1`, so without line buffering (scrolling of the buffer-window).
Combination of tags `<F-MLFID>` and `<F-NOFAIL>` can be used now to process multi-line logs using single-line expressions:
- tag `<F-MLFID>`: used to identify resp. store failure info for groups of log-lines with the same identifier (e. g. combined failure-info for the same conn-id by `<F-MLFID>(?:conn-id)</F-MLFID>`, see sshd.conf for example)
- tag `<F-NOFAIL>`: used as mark for no-failure (helper to accumulate common failure-info);
filter.d/sshd.conf: [sshd], [sshd-ddos], [sshd-aggressive] optimized with pre-filtering using new option `prefregex` and new multi-line handling.
2017-02-22 22:19:43 +01:00
sebres
8bcaeb9022
amend to 4ff8d051f4: fixed fail2ban-regex with journalmatch using systemd-journal
2017-02-21 17:07:37 +01:00
sebres
22afdbd536
Several filters optimized with pre-filtering using new option prefregex
2017-02-21 15:54:59 +01:00
sebres
2fad50b6e8
Precedence of prefregex higher as failregex should be in head of the convert-stream;
...
Allow using failure-id (`<HOST>`) within `prefregex` (by common prefix for all expressions specified with `failregex`)
2017-02-21 15:54:25 +01:00
sebres
4ff8d051f4
Introduced new filter option prefregex for pre-filtering using single regular expression;
...
Some filters extended with user name;
[filter.d/pam-generic.conf]: grave fix injection on user name to host fixed;
test-cases in testSampleRegexsFactory can now check the captured groups (using additionally fields in failJSON structure)
2017-02-20 16:54:17 +01:00
sebres
9d15a792a5
amend to fe06ffca71: small optimization using already known IP family
2017-02-20 16:46:45 +01:00
sebres
fe06ffca71
Fix retrieving of IPv6 address with dnsToIp on some systems (default returns AF_INET family only), fix network test-cases.
2017-02-20 12:17:28 +01:00
sebres
61c8cd11b8
Exposes filter group captures in actions (non-recursive interpolation of tags <F-...>);
...
Closes gh-1110
2017-02-20 11:36:08 +01:00
sebres
6d878f3a43
try to provide filter captures (already in ticket data) to the actions as interpolation options (closes gh-1110)
2017-02-17 23:47:41 +01:00
Serg G. Brester
2fa18a74c4
Merge branch 'master' into master
2017-02-17 09:06:09 +01:00
sebres
a8c0cec4ac
small amend with several fixes and test coverage
2017-02-16 22:13:56 +01:00
sebres
9ebf70cd6a
Safer, more stable and faster replaceTag interpolation (switched from cycle over all tags to re.sub with callable)
2017-02-16 18:28:59 +01:00
sebres
a6318b159b
substituteRecursiveTags optimization + moved in helpers facilities (because currently used commonly in server and in client)
2017-02-16 16:01:10 +01:00
sebres
3fae8a7e43
amend to fc315be4ea: parse and interpolate all options in section "Definition" (section "Init" no more needed),
...
because of better performance with this solution;
2017-02-16 14:53:57 +01:00
sebres
4bf09bf297
provides new tag <ip-rev> for PTR reversed representation of IP address;
...
[action.d/complain.conf] fixed using this new tag;
2017-02-16 13:38:20 +01:00
sebres
fc315be4ea
try to parse and interpolate all options in section "Definition" (section "Init" no more needed)
2017-02-16 13:32:56 +01:00
Serg G. Brester
7f63809afb
Merge branch '0.10' into patch-1
2017-02-15 20:33:36 +01:00
Serg G. Brester
2d12349eac
Update servertestcase.py
...
Make the test-case gh-1685 compliant
2017-02-15 20:30:48 +01:00
sebres
abd80696ab
Merge branch 'py-3.6-compat' into 0.10
2017-02-15 19:09:20 +01:00
sebres
cf53a834f7
python-3.6 compatibility:
...
- dynamical string replacement within call of regexp.sub fixed with lambda-replacement (otherwise "sre_constants.error: bad escape \s at position");
- optional arguments (3.6 has more agrs by calling of SMTPServer.process_message);
- implicit convert byte to string, because python3.6 fails on binary data (test_smtp).
2017-02-15 19:05:45 +01:00
sebres
01db0b5028
small performance fix after merge with 0.10
...
(cherry picked from commit 8e2711681c )
2017-02-15 19:04:24 +01:00
sebres
63f7916886
fix test cases by testing with multi-threaded execution (wait for threaded execution done)
...
(cherry picked from commit 1ec6782f32 )
# Conflicts:
# fail2ban/tests/observertestcase.py (not yet available in 0.10)
2017-02-15 18:58:40 +01:00
sebres
f35aa6d258
coverage: added python3.6
2017-02-15 08:46:27 +01:00
sebres
40837754c9
python3.6 compatibility fix
2017-02-15 08:45:15 +01:00
Christoph Theis
861ce4177c
#1689 : Make lowest rule number in action.d/bsd-ipfw.conf configurable
2017-02-14 18:31:42 +01:00
Felix Yan
68d829c1dd
Add a path configuration for Arch Linux
2017-02-14 18:43:01 +08:00
Jan Grewe
58c68b75f0
Remove double-quotes from email addresses
2017-02-08 14:16:13 +01:00
Jan Grewe
1bcf0de7c1
Update complain.conf
2017-02-07 21:39:46 +01:00
Serg G. Brester
ac7be38dbe
Merge pull request #1686 from Slamdunk/postfix-rbl-554-SMTP
...
Postfix RBL: 554 & SMTP
2017-02-07 15:37:18 +01:00
Filippo Tessarotto
607568f5da
Postfix RBL: 554 & SMTP
2017-02-07 15:26:06 +01:00
Jan Grewe
901eeff53d
Make Abusix lookup compatible with Dash
2017-02-06 22:04:36 +01:00
sebres
96d404f0fb
Merge branch 'master' into 0.10
2017-01-23 09:27:40 +01:00
sebres
c4dc698d98
evil symlink removed: does not supported by some file systems (e. g. development over net share)
2017-01-23 09:26:05 +01:00
sebres
1823571e0f
Merge branch 'ssh-filter-new-regexp' into 0.10
2017-01-23 08:58:43 +01:00
sebres
c4d56ea84a
Merge branch 'ssh-filter-new-regexp'
2017-01-23 08:58:03 +01:00
sebres
9d06f0ee40
sshd-amend: optional space after port part
2017-01-23 08:56:47 +01:00
sebres
e8a1556562
Merge remote-tracking branch 'master' into 0.10
...
# Conflicts:
# fail2ban/tests/samplestestcase.py
2017-01-21 16:59:41 +01:00
Serg G. Brester
3ccb026840
Merge pull request #1209 from sebres/ssh-filter-new-regexp
...
sshd-aggressive (new ssh rules added (gh-864) and code review...)
2017-01-21 16:29:42 +01:00
sebres
54a8c681ce
suhosin.conf: removed greedy match
2017-01-21 16:26:07 +01:00
sebres
8aa9516d50
sshd.conf: fixed expression "received disconnect ... auth fail" - optional space after port part (gh-1652)
2017-01-21 16:18:03 +01:00
sebres
c8f473110c
change log update after rebase
2017-01-21 15:59:27 +01:00
sebres
3276bd6d54
sshd: additionally aggressive filter rules - no matching cipher resp. no matching key exchange method (gh-1545, gh-1117)
2017-01-21 15:57:05 +01:00
sebres
628789f9a9
sshd: conditional parameter "mode" for sshd jail (normal, ddos, aggressive)
...
filter sshd-ddos and new filter sshd-aggressive are both derivation of sshd-filter
2017-01-21 15:54:49 +01:00
sebres
dd373dba9f
test all config-regexp, that contains greedy catch-all before <HOST>, that is hard-anchored at end or precise sub expression after <HOST>;
...
new ssh rule(s) added:
- Connection reset by peer (multi-line rule during authorization process);
- No supported authentication methods available;
Single line and multi-line expression optimized, added optional prefixes and suffix (logged from several ssh versions);
closes gh-864
2017-01-21 15:53:48 +01:00
Serg G. Brester
5e08298b6b
Update ChangeLog
2017-01-20 08:47:30 +01:00
Christian Brandlehner
a4d8426401
Support for IBM Domino SMTP task ( #1603 )
...
filter.d/domino-smtp.conf
2017-01-20 08:44:20 +01:00
Serg G. Brester
40f294e6bf
Merge pull request #1663 from jjeziorny/netscaler-action
...
Introduced citrix netscaler action
2017-01-19 16:25:23 +01:00
Serg G. Brester
75b252e47f
Update ChangeLog
2017-01-19 15:00:08 +01:00
Juliano Jeziorny
1fe554dd25
Introduced Citrix Netscaler action
2017-01-19 14:30:25 +01:00
Serg G. Brester
063a11564b
Merge pull request #1673 from chtheis/master
...
Wrong paths for apache and nginx under FreeBSD
2017-01-18 17:12:20 +01:00
Christoph Theis
fe76cd9b7d
#1667 : changelog entry
2017-01-17 14:05:20 +01:00
Christoph Theis
6187431629
#1667 : Wrong paths for apache and nginx under FreeBSD
2017-01-17 11:48:25 +01:00
Serg G. Brester
5bfdd521f0
Merge pull request #1669 from sebres/0.10-recognize-restored-tickets
...
Recognize state of restored tickets
2017-01-17 09:39:56 +01:00
sebres
f35da076df
ChangeLog entry
2017-01-16 09:55:01 +01:00
sebres
74a6afadd5
Mail-actions switched to use new option "norestored" instead of checking of variable restored during shell execution (prevents executing of such actions at all).
2017-01-16 09:40:48 +01:00
sebres
8b82c6669e
provide name of action to fail-message (e. g. if interpolation fails)
2017-01-16 09:34:10 +01:00
sebres
0aa241d303
Another way to recognize restored tickets - new option norestored of action introduced;
...
Complete prevents executing of ban/unban operations for actions where norestored = true.
2017-01-16 09:05:45 +01:00
sebres
2ed2e7810d
normalization of DefinitionInitConfigReader (action / filter): client-side interpolation, etc.
2017-01-16 09:03:06 +01:00
sebres
de49f0c27f
ChangeLog entry
2017-01-13 19:45:10 +01:00
sebres
ee3c787cc6
Recognize restored (from database) tickets after restart (tell action restored state of the ticket);
...
Prevent executing of several actions (e.g. mail, send-mail etc) on restart (bans were already notified).
Test cases extended (smtp and by restart in ServerReloadTest).
Closes gh-1141
Closes gh-921
2017-01-13 19:06:17 +01:00
oliverdorn
4a65e069e1
Solution for issue #1665
...
Solves the issue of authentic GoogleBots being banned by apache-fakegooglebots.
2017-01-13 08:59:45 +01:00
Serg G. Brester
6f190b6e61
readme.md: added IPv6 launch logo for 0.10th branch
...
Closes gh-1647
2017-01-12 12:41:08 +01:00
sebres
bf872213bd
amend for 7019640eb3 (fix-gh-1658): sshd test-cases extended with IPv6 to cover this fix
2017-01-10 13:48:17 +01:00
sebres
7019640eb3
Merge branch 'fix-gh-1658' into 0.10
2017-01-10 12:59:51 +01:00
sebres
a9523aefbb
sshd.conf: fixed non-anchored part of regex (misleading match of colon inside IPv6 address instead of : in the reason-part by missing space).
2017-01-10 12:58:44 +01:00
sebres
c9f32f75e6
Merge branch '0.9-fix-regex-using-journal' into 0.10-fix-regex-using-journal (merge point against 0.9 after back-porting gh-1660 from 0.10)
2017-01-10 11:25:41 +01:00
sebres
f8d35a7c9c
changelog entry
2017-01-10 11:16:17 +01:00
sebres
2009f1c434
fail2ban-regex: fix for systemd-journal (see gh-1657)
2017-01-10 11:13:18 +01:00
sebres
fb27d9ce83
fail2ban-regex: fix for systemd-journal (see gh-1657)
2017-01-10 10:59:53 +01:00
Andrew James Collett
18d09b6d8e
Updated changelog.
2017-01-08 09:50:58 +02:00
Andrew James Collett
3991f51f30
Update jail.conf
...
Sigh, added a space back that I somehow missed in Vim, despite it being a rebase...
2017-01-08 09:45:35 +02:00
Andrew James Collett
10d61e0779
Fixed the spaces again
2017-01-08 09:42:15 +02:00
Andrew James Collett
b35391e768
Update jail.conf
...
Fixing spacing
2017-01-08 09:30:00 +02:00
Andrew James Collett
1c41390f7c
Restructured the way the catagories work.
...
Jail.conf is cleaner and abuseipdb.conf is more flexible.
2017-01-08 09:26:11 +02:00
Andrew James Collett
55e107310f
Added config for AbuseIPDB, ony tested on Ubuntu 16.04
2017-01-07 14:24:54 +02:00
Viktor Szépe
81c1810f10
Introduce Cloudflare API v4
...
In the cloudflare action everyone is suggested to use API v4.
And I don't dare to contribute any actual change.
2016-12-31 21:30:57 +01:00
Hank Leininger
9fbf713d7d
Wait up to 30 seconds on "stop" to avoid errors.
...
The fail2ban server can take several seconds to shut down. This can
make Gentoo's start-stop-service time out and decide that stopping has
failed, even if it actually succeeds a few seconds later.
The default timeout for start-stop-service if --retry is not specified
appears to be 5 seconds. Increase that to 30 seconds to be sure that if
fail2ban-server is going to be able to stop, it has time to do so.
2016-12-28 11:14:32 -05:00
benrubson
cc311b56f3
Apache URIs can contain spaces
2016-12-23 22:57:24 +01:00
roedie
3adc16d266
Shorewall IPv6 suggested changes.
...
Change files as suggested by sebres.
2016-12-12 20:53:58 +01:00
Yaroslav Halchenko
31a1560eaa
minor typos (thanks Vincent Lefevre, Debian #847785 )
2016-12-11 15:13:11 -05:00
roedie
6e18508a07
Add shorewall IPv6 support
...
Small patch which allow fail2ban to use shorewall for IPv6 bans.
2016-12-11 20:44:54 +01:00
Yaroslav Halchenko
4a1fd888f0
Carry on development
2016-12-11 00:49:09 -05:00
Yaroslav Halchenko
3605155978
updated man pages
2016-12-09 09:36:08 -05:00
Yaroslav Halchenko
482252dbd4
ENH: prep for 0.9.6 release (as of tomorrow)
2016-12-09 09:35:03 -05:00
Yaroslav Halchenko
e550850b9c
BF: added missing entires into MANIFEST
2016-12-09 09:34:44 -05:00
Serg G. Brester
556a9373ce
Update ChangeLog
2016-11-28 23:40:33 +01:00
Serg G. Brester
feae7370ce
Update THANKS
2016-11-28 23:19:24 +01:00
sebres
45f1d811c9
Merge branch 'alex1702-1586'
2016-11-28 18:54:02 +01:00
sebres
67c14afd8e
ChangeLog entry added + jail.conf review
2016-11-28 18:51:23 +01:00
sebres
425170cef3
code review, makes the test cases workable, added dev-notes
2016-11-28 18:39:07 +01:00
Serg G. Brester
8d9fe5d3da
Merge pull request #1583 from sebres/_0.10/fix-datedetector-grave-fix-v2
...
0.10/datedetector grave fix
2016-11-28 17:37:36 +01:00
sebres
8018796b45
wrong indentation (important code-piece in if log-level only)
2016-11-28 17:17:48 +01:00
sebres
39c343bd06
better reorder templates handling, code coverage increase (a small part of _reorderTemplate was not covered at all)
2016-11-28 15:18:31 +01:00
sebres
5d5ab27435
small amend: removed unreachable code + coverage increase
2016-11-28 13:17:36 +01:00
Serg G. Brester
f827675822
Merge pull request #1627 from sebres/fix-gh-1626
...
Fix gh-1626: one space after ModSecurity
2016-11-28 12:00:53 +01:00
sebres
b8c41dcb49
ChangeLog update
2016-11-28 11:31:51 +01:00
sebres
931eab84b5
filter.d/apache-modsecurity.conf
...
- fixed for newer version (one space, closes gh-1626)
reviewed and optimized:
- non-greedy catch-all replaced for safer match
- unneeded catch-all anchoring removed
- non-capturing groups
2016-11-28 11:28:27 +01:00
sebres
c06084d7d9
_start_params - fix: symlinks should be absolute paths
2016-11-28 11:04:37 +01:00
sebres
40cbe96352
Merge remote-tracking branch 0.10 into _0.10/fix-datedetector-grave-fix-v2
2016-11-28 11:03:11 +01:00
Serg G. Brester
389ad10344
Merge pull request #1622 from sebres/_0.10/configreader-and-more
...
0.10/configreader and more: substitution `%(param)s` from init block
2016-11-28 10:08:30 +01:00
Serg G. Brester
b8b5907706
Merge pull request #1624 from sebres/fix-gh-1623
...
filter.d/dovecot.conf update: ignore additionally irrelevant info in anchored regex before "auth failed"
2016-11-26 17:07:39 +01:00
sebres
5678d08a79
filter.d/dovecot.conf update:
...
- fixes failregex, that ignores failures through some irrelevant info (closes #1623 );
- ignores whole additionally irrelevant info in anchored regex before fixed failure data `\((?:auth failed, \d+ attempts( in \d+ secs)?|tried to use (disabled|disallowed) \S+ auth)\)`
- review, IPv6 compatibility fix, non-capturing groups
2016-11-26 16:50:37 +01:00
sebres
ce540554c5
Merge configreader-py3-compat branch into _0.10/configreader-and-more
2016-11-25 20:14:45 +01:00
sebres
ec7bb0d6c9
python 3x compatibility fix (positional arguments vs named arguments)
2016-11-25 20:12:49 +01:00
Serg G. Brester
ac1729e473
Merge pull request #1620 from fail2ban/close-gh-1120
...
jail.conf: added `knocking_url` filter-parameter of `pass2allow-ftp`...
2016-11-25 19:29:10 +01:00
sebres
a2af19c9f0
fixed several actions, that could not work with jails using multiple logpath; additionally repaired execution in default shell (bad substitution by ${x//...} executing in /bin/sh);
...
added helper "action.d/helpers-common.conf", and `_grep_logs` part-command for actions needed grep logs from multiple log-files
test cases: executing of some complex actions covered
2016-11-25 19:27:26 +01:00
sebres
65abc639cc
allow newline in extra init-parameters of action/filter (or interpolation of it), e. g. action[..., logpath="%(logpath)s"]
2016-11-25 16:56:46 +01:00
sebres
097970781c
filter/action (and its includes): substitution %(param)s may be used now (instead of <param>) for init-values specified in jail-configs via action[param1="...", param2=...];
...
substitution `<param>` should be used for dynamic interpolation only (todo: review configurations to replace it);
2016-11-25 16:53:46 +01:00
sebres
b856e1dadc
Merge pull request #1618 from sebres/_0.10/systemd-service
2016-11-24 20:45:17 +01:00
sebres
308bba448c
ChangeLog update
2016-11-24 20:43:55 +01:00
sebres
95dd76b7dd
Merge pull request #1619 from sebres/_0.10/skip-wrong-jails
2016-11-24 20:27:40 +01:00
sebres
d908688b56
ChangeLog update
2016-11-24 20:25:08 +01:00
Serg G. Brester
4f5389fee5
Update jail.conf
2016-11-24 19:30:10 +01:00
sebres
45174c5eaf
if fail2ban running as systemd-service, for logging to the systemd-journal, the logtarget could be set to STDOUT
...
small fixes by logging in stdout (+ system targets also allowed in lowercase now)
2016-11-24 12:13:47 +01:00
sebres
1cd67ecaa2
automatically creates /var/run/fail2ban before start fail2ban (systems which /var/run/ is virtual resp. memory mount device)
2016-11-24 11:37:18 +01:00
sebres
7256a5cb8e
code review: back to previous code - no skipping in testReadTestJailConf
2016-11-22 17:55:27 +01:00
sebres
8ed5b44bfd
no cover for sporadic executed (time-related) code pieces (just to prevent randomly increasing/decreasing of coverage)
2016-11-22 17:38:32 +01:00
sebres
fdac44ca58
introduced new option -t or --test to test configuration resp. start server only if configuration is clean (not skip wrong configured jails if option -t specified);
2016-11-22 17:08:44 +01:00
sebres
3e9852d4d2
code review, increase coverage
2016-11-22 14:56:54 +01:00
sebres
4882093a41
test cases extended: cover skipping invalid jail
2016-11-22 14:09:44 +01:00
sebres
e52b47d8f5
normalized log output (all jail parameters in filter are indented with 2 spaces)
2016-11-22 13:57:20 +01:00
sebres
c6e8c700f7
test cases fixed
2016-11-22 13:57:06 +01:00
sebres
77dc5a334c
really skips invalid jails (because of theirs wrong configuration) - server starts nevertheless, as long as one jail was successful configured;
...
message about wrong jail configuration logged in client log (stdout, systemd journal etc.) and in server log as error
2016-11-22 13:23:30 +01:00
sebres
528a7a5abb
systemd service update:
...
- starting service in normal mode (without forking)
- does not restart if service exited normally (exit-code 0, e.g. stopped via fail2ban-client)
- does not restart if service can not start (exit-code 255, e.g. wrong configuration, etc.)
- service can be additionally started/stopped with commands (fail2ban-client, fail2ban-server)
2016-11-22 11:14:27 +01:00
Johannes Weberhofer
f46ada023e
Use Fedora's backend-settings for openSUSE
...
Those settings are ok for newer openSUSE versions
2016-11-22 09:03:54 +01:00
sebres
261f875748
Fixed sporadic tab-replacement (\n\t instead of \n by word wrapping) in mime content of smtp-message in test cases, see
...
https://github.com/fail2ban/fail2ban/pull/1410#issuecomment-262000804
2016-11-21 19:06:17 +01:00
Serg G. Brester
44fddc102d
Merge pull request #1616 from sebres/fix-1194
...
[fix-gh-1194] Fixed misleading errors logged from ignorecommand in success case on retcode 1
2016-11-21 17:15:16 +01:00
sebres
701abfd250
ChangeLog entry added
...
+ indentation fix (space-tab replacement)
2016-11-21 17:13:43 +01:00
sebres
c442569b63
executeCmd: added possibility to select success return codes
...
ignorecommand: both return codes (0, 1) are success codes now, so no errors will be logged + test cases extended to check this (and error case)
2016-11-21 16:35:33 +01:00
sebres
189e70d99c
processLine etc. rewritten:
...
- normalize calling parameters (persistent parameters moved from function arguments to filter member variables)
- save last line as lambda instead of return it as string (lazy convert of process line tuple to string on demand, needed in fail2ban-regex only)
2016-11-18 17:02:00 +01:00
sebres
a2cf34a64e
code review: added endpos to found tuple, just to be safe by unpack
2016-11-17 21:12:23 +01:00
sebres
b5433f48b7
amend after code review of merge gh-1581
2016-11-11 11:09:46 +01:00
sebres
bee6e7376b
Merge branch 'aclindsa:master'
2016-11-11 10:58:40 +01:00
sebres
ea4c1f6356
Merge branch 'master' into 0.10
2016-11-11 10:29:45 +01:00
sebres
dab5f56609
Merge branch 'fix-gh-1477'
2016-11-11 10:17:07 +01:00
Alex
8ac28e5dcb
Make changes and add test file
2016-11-10 13:09:32 +01:00
Alex
8c40766511
Add Mongodb-auth filter and jail
2016-11-10 12:48:24 +01:00
Serg G. Brester
4e252be76f
Update FILTERS
...
closes #1591
2016-10-25 11:01:32 +02:00
sebres
58717c1854
fail2ban-testcases: persistently set (python) time zone to CET during test cases process (used in zone-related test-cases)
2016-10-17 13:26:24 +02:00
sebres
c8b036456d
changelog entries
2016-10-17 12:47:42 +02:00
sebres
ffa9705412
fixed UTC/GMT named time zone using %Z and %z patterns (special case with 0 zone offset);
...
Currently still ignores another named zones, because fail2ban assumes that the given date is in the current default zone.
Closes gh-1575
2016-10-17 12:09:53 +02:00
sebres
faee5f1fdc
better caching (thereby better performance), better recognition of similar regex
2016-10-17 11:20:30 +02:00
sebres
ae7297e16b
more precise date template handling (WARNING: this commit creates possible incompatibilities):
...
- datedetector rewritten more strict as earlier;
- default templates can be specified exacter using prefix/suffix syntax (via `datepattern`);
- more as one date pattern can be specified using option `datepattern` now (new-line separated);
- some default options like `datepattern` can be specified directly in section `[Definition]`, that avoids contrary usage of unnecessarily `[Init]` section, because of performance (each extra section costs time);
- option `datepattern` can be specified in jail also (jails without filters);
- if first group specified, only this will be cut out from search log-line (e. g.: `^date:[({DATE})]` will cut out only datetime match pattern, and leaves `date:[] failure ip...` for searching in filter);
- faster match and fewer searching of appropriate templates (DateDetector.matchTime calls rarer DateTemplate.matchDate now);
- standard filters extended with exact prefixed or anchored date templates;
template cache introduced (in opposition to default template cache, holds custom templates cached by pattern for possible common usage of same template/regex);
2016-10-17 11:20:27 +02:00
sebres
bd1eb70c52
speedup template first time selection through pre-sorted template list by template hits
2016-10-17 11:18:35 +02:00
sebres
0bed91b3c2
speedup SeekToTime test cases using exact date pattern...
2016-10-17 11:18:33 +02:00
sebres
e735f8f568
default non-unicode and case-sensitive matching (by pattern templates automatically add (?iu) for "ignore case" and "unicode" if expected)
2016-10-17 11:18:32 +02:00
sebres
ab0ac2111c
added possibility to specify more precise default date pattern:
...
- `datepattern = {^LN-BEG}` - only line-begin anchored default patterns
(matches date only at begin of line, or with max distance up to 2 non-alphanumeric characters from line-begin);
- `datepattern = {*WD-BEG}` - only word-begin anchored default patterns;
- `datepattern = ^prefix{DATE}suffix` - exact specified default patterns (using prefix and suffix);
common filter configs gets a more precise, line-begin anchored (datepattern = {^LN-BEG}) resp. custom anchoring default date-patterns;
2016-10-17 11:18:30 +02:00
sebres
f56ff5f48b
optimized to better usage of the last time template (parse part of line at the same place as last time, if enclosed in the same boundaries)
...
thereby follow rule "shortest distance to datetime should win", so possible collision causes search though all templates;
speedup it a little bit (not possible collision if distance <= 1 or if line-begin anchoring, so break search if such template found)
2016-10-17 11:18:27 +02:00
sebres
b9033d004e
amend distance collision check - always find template with shortest distance, also first time (test-case extended);
...
datedetector property template without lock, initially placed start-anchored templates at begin of template list, small optimization of strptime
2016-10-17 11:18:26 +02:00
sebres
75a5440acf
extends date detector template with distance (position of match in log-line), to prevent grave collision using (re)ordered template list (e.g. find-spot of wrong date-match inside foreign input, misleading date patterns by ambiguous formats, etc.);
...
By change of the distance (e.g. another format found), the pattern with smallest distance will be always preferred now.
To speedup (template lookup) resp. minimize of list reorder counts, the distance will be used as divider factor of the template weight by the templates comparison.
2016-10-17 11:18:24 +02:00
sebres
84fe55b99b
[temp commit] 2nd try to optimize datedetector/datetemplate functionality (almost ready, needs fine tuning)
2016-10-17 11:18:19 +02:00
sebres
a7d9de8c52
[temp commit] 1st try to optimize datedetector/datetemplate functionality (fix ambiguous resp. misleading date detection if several formats used in log resp. by format switch after restart of some services):
...
* Misleading date patterns defined more precisely (using extended syntax %E[mdHMS]
for exact two-digit match)
* `filter.d/freeswitch.conf`
- Optional prefixes (server, daemon, dual time) if systemd daemon logs used (gh-1548)
- User part rewritten to accept IPv6 resp. domain after "@" (gh-1548)
2016-10-17 11:16:20 +02:00
Aaron Lindsay
7805f9972d
filter.d/sshd.conf: Match 'Invalid user' with 'port \d*'
2016-10-15 15:52:19 -04:00
Yaroslav Halchenko
5502e47486
Merge pull request #1579 from sebres/fix-gh-1578
...
filter.d/sendmail-reject.conf: double space (should be by missing dns-host only)
2016-10-15 13:18:52 -04:00
sebres
10bdadaef2
fixed sporadically (multi-threading) errors by reload/stop/start of polling filter inside getModified (so prevents to stop running main cycle)
2016-10-15 19:12:11 +02:00
sebres
519e355bf2
ChangeLog entry added
2016-10-15 14:59:36 +02:00
sebres
84c3eb3e0e
filter.d/sendmail-reject.conf: double space (should be by missing dns-host only)
...
Closes #1578
2016-10-15 14:53:45 +02:00
Serg G. Brester
c1174d7935
Merge pull request #1577 from sebres/_0.10/code-review-fix-log-fmt-auto-verbosity
...
0.10/code review + fix log format by auto verbosity
2016-10-15 13:01:19 +02:00
sebres
7f8c48d59e
code review (e. g. remove code duplication) and coverage
2016-10-15 00:39:25 +02:00
sebres
5b40309052
code coverage of server module: switch backend
2016-10-14 23:57:52 +02:00
sebres
57a7795282
code coverage of server module: multiple ignoreregex
2016-10-14 23:57:35 +02:00
sebres
1ef367e77a
fixes log format by starting server with --loglevel=debug without specifying of verbosity level
2016-10-14 23:30:12 +02:00
sebres
98f87a1a52
better server-ready event: notify waiting thread if server really ready (communication ready) or failed to start
2016-10-14 22:50:30 +02:00
sebres
c809c3e61e
Merge branch 'master' into 0.10
2016-10-13 19:01:13 +02:00
sebres
15dc2db8bb
Merge pull request #1498 from ahpnils:npf to master:
...
This new action files adds support for the NPF packet filter, available on NetBSD since version 6.0.
Closes #1498
2016-10-13 19:00:54 +02:00
Nils
f7df6026a3
Update Changelog to reflect the new np.conf action
2016-10-13 18:53:16 +02:00
Nils
d08db22b92
Create npf.conf for the NPF packet filter
...
This file adds support for the NPF packet filter, available on NetBSD since version 6.0
2016-10-13 18:50:54 +02:00
Serg G. Brester
77f2dcfdb6
Merge pull request #1576 from sebres/_0.10/fail2ban-regex-coverage
...
tests of fail2ban-regex extended to cover exec_command_line also
2016-10-13 18:42:07 +02:00
sebres
44f93bfbff
increase coverage, better test and output of errors
2016-10-13 18:27:59 +02:00
sebres
7e8575cc56
tests of fail2ban-regex extended to cover exec_command_line also;
...
Closes #1573
2016-10-13 17:32:38 +02:00
Serg G. Brester
733d0ef596
Merge pull request #1569 from sebres/_0.10/fix-fakegooglebot
...
fixes deprecated DNSUtils.IsValidIP in fakegooglebot ignore command
2016-10-06 12:15:49 +02:00
sebres
2d2d4cf185
amend to c2d2e79b0d: fixed sporadically bug in getBanListExtendedCymruInfo:
...
except dns.resolver.NXDOMAIN:
UnboundLocalError: local variable 'dns' referenced before assignment
2016-10-05 15:43:39 +02:00
sebres
0ae932ba5e
setup fix for python3, bypass directories (__pycache__) created after ignore command was tested
2016-10-05 15:29:56 +02:00
sebres
fa8184d4cc
fixes deprecated DNSUtils.IsValidIP in fakegooglebot ignore command + test covered now;
...
Closes #1559
2016-10-05 15:01:33 +02:00
sebres
973ac9a45c
amend to c2d2e79b0d: missing error variable in import block;
...
additionally fixes forgotten skip for cymru server case, if --no-network specified);
Closes #1568
2016-10-05 12:18:55 +02:00
sebres
c2d2e79b0d
ExtendedCymruInfo: better availability check (code review and timeout's);
...
max sleep time check of too long sleep increased to 1 second (typo fix)
2016-09-30 17:01:06 +02:00
sebres
ee1727ecca
Merge pull request #1563 from niklasf/fix-lazy-ipv6-regex (and sebres/fix-lazy-ipv6-regex) into 0.10
2016-09-30 13:34:54 +02:00
sebres
276759b6c2
ExtendedCymruInfo code review and availability check in test cases;
...
max sleep time check of too long sleep increased to 1 second
2016-09-30 13:19:00 +02:00
sebres
9bf8985e2a
nginx-limit-req.conf: more precise failregex (word-boundary if <HOST> should be non-greedy for some reasons)
2016-09-30 12:33:43 +02:00
sebres
06674bb989
use common regex for IP addresses (removed code duplication)
2016-09-30 12:33:41 +02:00
Serg G. Brester
ba9a88977f
Merge pull request #1562 from sebres/_0.10/fix-stability-and-speed
...
0.10/fix stability and speed optimization
2016-09-30 12:14:51 +02:00
sebres
8b0f6c5413
badips test cases check availability of badips service (and skip this tests if it not available)
2016-09-30 12:03:27 +02:00
sebres
9a7c753372
fixes method-related filter for tests of suite loaded with loadTestsFromName (they may be a suite self)
2016-09-30 11:26:49 +02:00
Niklas Fiekas
057f2f3c56
make the ipv6 host regex greedy
...
Previously the regex was lazily matching ``2606:2800:220:1:248:1893:25c8:1946``
as ``2606:2800:220:1:248:1893:25c8:1``.
2016-09-30 11:08:07 +02:00
sebres
77ec9df678
standardize and normalize verbosity parameters for fail2ban-regex / fail2ban-testcases (-v ... -vvvv, or --verbosity=0..4)
2016-09-30 10:01:21 +02:00
sebres
2cfaf845ca
standardize and normalize logging and verbosity formats, logging level etc between command lines (server, client, test-cases);
...
test cases could pass (so increase) verbosity to the client (and furthermore client to the server also), usable for debug purposes resp. simplifying read of the log-file;
custom and precise numeric log-levels can be given in test cases now;
2016-09-29 21:23:37 +02:00
sebres
62b8664175
speedup server start/stop (waiting for communicate, etc);
...
extend server socket with timeouts, extend ping with timeout parameter;
2016-09-29 21:11:54 +02:00
sebres
542419acab
filtertestcase: use shorter sleep (almost just for the context switch here)
2016-09-29 21:08:27 +02:00
sebres
b615ba49ff
disengage testExecuteTimeout test-case from -fast option, just make it faster (timeout shorter) in this case
2016-09-29 21:08:25 +02:00
sebres
b011cf17b2
increase performance of executeCmd (actions), thereby introduced new shorter interval for fast operations (leaves unchanged default wait operation intervals (sleep time, threshold interval) - for the same inertance, to save same system (load by many jails resp. log files);
...
extends wait_for with callable timeout (test case fixed);
2016-09-29 21:07:46 +02:00
sebres
310d4e224d
Merge branch master (0.9) into 0.10
2016-09-29 19:46:11 +02:00
Serg G. Brester
8e3e333d54
Update ChangeLog
2016-09-27 14:17:45 +02:00
Serg G. Brester
d9e1a4f547
Merge pull request #1556 from szepeviktor/master
...
Monit config: scripting is not supported in path
2016-09-27 14:16:52 +02:00
Serg G. Brester
a0d8581a2c
Merge pull request #1557 from sebres/_0.10/fix-reload-bug
...
0.10/reload-and-more: reload without restart, stability and performance fixes
2016-09-26 15:25:36 +02:00
sebres
5151c4fa6d
ChangeLog entries added
2016-09-26 15:12:50 +02:00
sebres
5e4fdb60c8
extended test-cases (coverage)
2016-09-26 10:50:02 +02:00
sebres
449c46aec4
extended test-cases (coverage)
2016-09-23 15:21:23 +02:00
sebres
004879b5b1
code review: switch MAX_TIME to 0X7FFFFFFFFFFF (is enough, because 4461763-th year, but better performance)
2016-09-23 09:32:10 +02:00
sebres
e00be5f308
Fixed sporadically error in testCymruInfoNxdomain, because of unsorted values:
...
```
AssertionError: Dictionaries differ:
{'country': ['unknown', 'nxdomain'], 'asn': ['4565', 'nxdomain'], 'rir': ['other', 'nxdomain']} !=
{'country': ['nxdomain', 'unknown'], 'asn': ['nxdomain', '4565'], 'rir': ['nxdomain', 'other']}
```
Added assertDictEqual for compatibility to early python versions (< 2.7);
2016-09-22 22:45:54 +02:00
sebres
e7fa74b989
smaller inertance inside test-cases (amend to d153555a07 with decreasing default wait operation that litle bit speedup test-cases)
2016-09-22 22:45:52 +02:00
sebres
ab0c28260b
switch down log level for some annoying messages to tracedebug or heavydebug (to 7 or even 5);
...
added verification of specified log-level before transmitting to the server;
numeric log-level allowed now in server (resp. fail2ban.conf);
2016-09-22 22:44:46 +02:00
Viktor Szépe
a406c6eb3a
By the author:
...
> Yes, scripting is not supported in path.
https://bitbucket.org/tildeslash/monit/issues/372/webadmin-shows-only-the-first-part-of#comment-27946048
2016-09-22 20:29:26 +00:00
sebres
48ebe3e735
FilterPyinotify: high cpu load fix - timeout for pyinotify must be set in milliseconds (our time values are floats contain seconds);
2016-09-22 20:15:12 +02:00
sebres
c0373a7158
repair typo bug in reloading for systemd-filter;
...
JailThread get method `join` for safe usage of it, also for not started threads (test-cases or in case of error), that will be used for cleanup resp. wait purposes also (see join of pyinotify-filter);
2016-09-22 19:00:54 +02:00
sebres
d153555a07
increase default wait operation (sleep time, threshold interval) - avowedly greater inertance, but fewer system load by many jails resp. log files;
...
waiting with `wait_for` extended with verifying of active flag;
implemented better error handling in some multi-threaded routines;
shutdown of jails rewritten (faster and safer, does not breaks shutdown process if some error occurred);
2016-09-22 18:10:42 +02:00
sebres
35ce1166b6
allows to update some configuration options (read with config-readers) with command line option, e. g.:
...
```bash
## start server with DEBUG log-level (ignore level read from fail2ban.conf):
fail2ban-client --loglevel DEBUG start
## or
fail2ban-server -c /cfg/path --loglevel DEBUG start
## keep server log-level by reload (without restart it)
fail2ban-client --loglevel DEBUG reload
## switch log-level back to INFO:
fail2ban-client set loglevel INFO
```
2016-09-22 14:21:31 +02:00
Serg G. Brester
28e286cd2d
Merge pull request #1551 from fail2ban/sebres-patch-fips-gh-1540
...
filter.py: FIPS compliant fix (use sha1 instead of md5 if not allowed)
2016-09-21 09:35:25 +02:00
sebres
0f1d1a0d4d
ChangeLog: FIPS compliant
2016-09-21 09:22:18 +02:00
Serg G. Brester
1071db2256
filter.py: easy-fix to use sha1 instead of md5 if its usage prohibited by some systems following strict standards (like FIPS)
...
closes gh-1540
2016-09-20 00:00:26 +02:00
Serg G. Brester
fad953ade6
Merge pull request #1544 from sebres/fix/vsftpd-gh-1543
...
filter.d/vsftpd.conf: optional reason part in message after FAIL LOGIN
2016-09-09 20:39:51 +02:00
sebres
20b92f3ead
fail2ban-regex: build replacement of <HOST> substitution corresponding parameter usedns - now also in fail2ban-regex (amend)
2016-09-09 20:31:52 +02:00
sebres
ebd864660a
normalize usage of preferred encoding (and decode any to string);
...
python 3.x compatibility (used uni_decode for string representation of stdout/stderr, unified test cases)
amend for #1542
2016-09-09 20:29:55 +02:00
sebres
e0347bb3a0
assertLogged extended with parameter wait (to wait up to specified timeout, before we throw assert exception) + test cases rewritten using that
2016-09-09 17:50:25 +02:00
sebres
a20f325f80
database: stability fix - repack cursor iterator as long as locked
2016-09-09 17:36:01 +02:00
sebres
f6197200a9
introduced new flag "banned" as property, used to recognize the ticket was really banned;
...
get/set restored flag functions rewritten to property "restored" similar to "banned";
several code optimizations and tests extensions;
2016-09-09 16:12:48 +02:00
sebres
2108216d33
file filter-backends: stability fix for sporadically errors - always close file handle, otherwise may be locked (prevent log-rotate, etc.)
2016-09-09 16:08:28 +02:00
sebres
4404642fa3
pyinotify-backend: stability fix for sporadically errors in multi-threaded environment (without lock)
2016-09-09 10:56:35 +02:00
sebres
8c4eebc3e3
reload actions amend, code review and test cases extended for update/start/stop of actions by reloading
2016-09-09 10:45:09 +02:00
sebres
9fb167b5e1
filter.d/vsftpd.conf: optional reason message after FAIL LOGIN, closes #1543
2016-09-09 09:20:15 +02:00
sebres
4fb511294e
temp commit: reload now supported actions and action reloading (parameters, unban obsolete removed actions, etc.)
2016-09-08 23:56:32 +02:00
sebres
d1ef33cc45
New command action parameter actionrepair - command executed in order to restore sane environment in error case of actioncheck.
...
# [WARNING] TODO: be sure all banactions get a repair command, because otherwise stop/start will theoretically remove all the bans, but the tickets are still in BanManager, so in case of new failures it will not be banned, because "already banned" will happen.
2016-09-08 20:06:22 +02:00
sebres
8cba537f6c
code review and use new logger-signals for waiting; + regenerated man-files
2016-09-08 18:38:33 +02:00
sebres
27f6fc083a
optimized BanManager: increase performance, fewer system load, try to prevent memory leakage:
...
- better ban/unban handling within actions (e.g. used dict instead of list)
- don't copy bans resp. its list on some operations;
- added new unbantime handling to relieve unBanList (prevent permanent searching for tickets to unban)
- prefer failure-ID as identifier of the ticket to its IP (most of the time the same, but it can be something else e.g. user name in some complex jails, as introduced in 0.10)
2016-09-08 18:27:55 +02:00
sebres
d2ddc59c40
build replacement of <HOST> substitution corresponding parameter usedns - dns-part will be added only if usedns is not no;
...
new replacement for `<ADDR>` in opposition to `<HOST>`, for separate usage of 2 address groups only (regardless of `usedns`), `ip4` and `ip6` together, without host (dns)
2016-09-08 15:38:36 +02:00
sebres
8c26cada27
temp commit: partially cherry picked from ban-time-incr branch
2016-09-08 11:43:27 +02:00
sebres
b12a3acb06
temp commit: reload not ready...
2016-09-07 21:07:50 +02:00
sebres
f512628af2
make with_foreground_server_thread decorator to test several client/server commands
2016-09-06 20:15:45 +02:00
sebres
0a7374dec6
Merge branch '_0.9/fix-systemd-convert-gh-1341' into _0.10/fix-systemd-convert-gh-1341
2016-09-06 16:53:01 +02:00
sebres
7ac9890bf6
forgotten obsolete code removed
2016-09-06 16:51:06 +02:00
sebres
ad61f0f381
Merge branch '_0.9/fix-systemd-convert-gh-1341' into _0.10/fix-systemd-convert-gh-1341
2016-09-06 16:37:45 +02:00
sebres
51fd9a1027
amend to activate performance-fix (respect findtime before search of match) + code coverage
2016-09-06 16:33:16 +02:00
sebres
e3a75b4f1e
optimize test cases after merge (using 0.10-features)
2016-09-06 15:30:35 +02:00
sebres
ae38b626d1
Merge branch '_0.9/fix-systemd-convert-gh-1341' into 0.10
2016-09-06 15:30:08 +02:00
sebres
57458a462e
allow to set default or preferred encoding for other filters (e.g. to decode bytes from journal)
...
# Conflicts:
# fail2ban/server/filter.py
2016-09-06 15:26:10 +02:00
sebres
3119f81705
fixed journal systemd ascii/utf-8 default converting (see gh-1341, gh-1344)
2016-09-06 15:25:59 +02:00
Yaroslav Halchenko
aff680eb43
Merge branch 'master' into 0.10 (strategy ours)
...
* master:
RF: Replace old fashioned "except E , e" with "except E as e" (Closes #1537 )
2016-09-06 08:19:10 -04:00
Yaroslav Halchenko
87acd7a0fc
RF: Replace old fashioned "except E , e" with "except E as e" ( Closes #1537 )
...
0.10 specific
supplement to b875e51cd7 in master AKA 0.9
2016-09-06 08:18:34 -04:00
Yaroslav Halchenko
f6258c7b69
Merge branch 'rf-exc'
...
* rf-exc:
RF: Replace old fashioned "except E , e" with "except E as e" (Closes #1537 )
2016-09-06 08:16:40 -04:00
Yaroslav Halchenko
adeb6e94a5
Merge remote-tracking branch 'origin/master' into 0.10
...
* origin/master:
2016-09-06 08:14:23 -04:00
sebres
00c08f0cfa
Merge pull request #1523 from sebres/_0.10/systemd-journal-path-gh-1408 with 0.10
2016-09-06 10:07:29 +02:00
Serg G. Brester
0f942aba17
Merge pull request #1539 from sebres/_0.10/fix-gh-1529
...
0.10/fix-gh-1529
2016-09-06 09:08:18 +02:00
sebres
1d6b546658
sleep a little bit in error case (to get around time-related errors, e.g. something like log-rotate, etc.)
2016-09-05 16:37:32 +02:00
sebres
6454d0cd75
prevents to stop processing after first unhandled exception inside processLineAndAdd (filter going idle after 100th error);
2016-09-05 16:17:14 +02:00
sebres
90f9009959
fixes wrong date (invalid format or value) recognition if template available (+ test cases extended)
2016-09-05 16:11:45 +02:00
sebres
d974ebd581
rewritten idle handling for all filters, test cases extended to work in idle mode also (should not find/process failures)
2016-09-05 14:12:12 +02:00
Yaroslav Halchenko
b875e51cd7
RF: Replace old fashioned "except E , e" with "except E as e" ( Closes #1537 )
2016-09-04 23:25:09 -04:00
sebres
23c14acec0
update _0.10/systemd-journal-path-gh-1408 (after merge _0.9/systemd-journal-path-gh-1408 to 0.10)
2016-09-01 16:28:58 +02:00
sebres
387aa6ba47
Merge master branch '_0.9/systemd-journal-path-gh-1408' into 0.10
...
# Conflicts:
# fail2ban/tests/filtertestcase.py
# fail2ban/tests/utils.py
2016-09-01 16:26:21 +02:00
sebres
c0e0cfb39d
Merge remote-tracking branch 'remotes/gh-upstream/master' into 0.10
2016-09-01 16:23:13 +02:00
sebres
564b696530
Merge branch '_0.9/systemd-journal-path-gh-1408'
2016-09-01 16:18:53 +02:00
sebres
5f35b52b9a
test cases extended
...
several test-case functionality cherry picked from 0.10 (SkipTest, with_tmpdir)
2016-09-01 16:17:06 +02:00
sebres
35b5fea038
backend "systemd" can be used as prefix now - backend = systemd[...]
2016-09-01 16:17:04 +02:00
sebres
7ed6cab120
jail configuration extended with new syntax to pass options to the backend (see gh-1408),
...
examples:
- `backend = systemd[journalpath=/run/log/journal/machine-1]`
- `backend = systemd[journalfiles="/run/log/journal/machine-1/system.journal, /run/log/journal/machine-1/user.journal"]`
- `backend = systemd[journalflags=2]`
2016-09-01 16:17:02 +02:00
sebres
1c4733ef89
[systemd] added new constructor parameters like journalpath, journalfiles and journalflags for systemd backup
...
optimized FilterSystemd method `run`: better wait in idle (no busy-loop), better poll handling, the ban will executed anywhere (at least at 100th log-entry), also if we have never ending logging in this jail (e.g. extremely logging or too many failures)
systemd test cases extended
2016-08-24 20:55:06 +02:00
Serg G. Brester
0ab042fcce
Merge pull request #1522 from sebres/fix-asterisk-log-prefix
...
filter.d/asterisk.conf: another part ` chan_sip.c:28468 handle_request_register:` (without `in`) in log prefix
2016-08-23 11:18:59 +02:00
sebres
4a1d720344
filter.d/asterisk.conf: another part chan_sip.c:28468 handle_request_register: in log prefix
2016-08-22 14:10:50 +02:00
sebres
2c54f90469
sshd-filter: better universal regexp, that matches more complex different injects, using conditional expressions (on username and auth-info section), see new test cases also.
2016-08-19 10:19:12 +02:00
sebres
a544c5abac
sshd-filter: recognized "Failed publickey for" now (gh-1477) + improved regexp (not anchored now to recognize all "Failed anything for ... from <HOST>"
...
ChangeLog entry added
2016-08-18 21:38:55 +02:00
Yaroslav Halchenko
6c737454dd
RF+ENH: 0.10/let know version when running tests and move arg parsing code into the module ( #1516 )
2016-08-18 10:14:03 -04:00
sebres
af126eb308
simplify fail2ban-testcases: move some code pieces inclusive option parser from fail2ban-testcases to tests/utils.py (+ coverage)
2016-08-18 15:05:03 +02:00
sebres
f7f618b15d
Let know the version (and python), also in travis (no output if verbosity is 0)
2016-08-18 14:22:38 +02:00
Serg G. Brester
13a70e3bdb
Merge pull request #1515 from sebres/_0.10/fix
...
0.10 fix sporadically test case assertion error in MonitorJournalFailures
2016-08-17 18:06:26 +02:00
sebres
9aca34d3b1
normalize name of the test cases: method and class name fixed for MonitorJournalFailures
2016-08-17 17:48:57 +02:00
sebres
4bb5f3492e
Merge branch '_0.10/tests-verbosity' into _0.10/fix
2016-08-17 16:45:04 +02:00
sebres
cd6b528542
new test-cases option "--verbosity" to set numeric level of verbosity during test cases;
...
travis uses same verbosity (2) running in python3 as from setup (python2)
2016-08-17 16:41:33 +02:00
sebres
f91ec84bfb
prevent theoretical time-related assertion errors for other filters, replace isFilled with waitFailTotal (known expected failure count)
2016-08-17 15:50:08 +02:00
sebres
67e4ac5c66
common monitor test case class, that unite some duplicate code
2016-08-17 13:45:50 +02:00
sebres
7b7d60c486
fixed sporadically test cases assertion error "AssertionError: 3 != 4" - because multi-threaded, occurred if getFailTicket() called after 3th failure (before 4th failure was monitored), so we will wait in new method waitFailTotal (instead of isFilled) for expected failure count...
2016-08-17 13:44:10 +02:00
Serg G. Brester
e3f4ea7284
Update README.md
...
fixed coveralls url to the default branch
2016-08-16 10:43:01 +02:00
Serg G. Brester
9a30cfa77d
Merge pull request #1510 from sebres/_0.10/optimize-setup-test-case
...
0.10/optimize setup test case
2016-08-16 10:16:42 +02:00
sebres
2b5c5103f4
safer multi-threaded execution inside (logging with lock inside LogCaptureTestCase logging handler);
...
additionally developer option `--log-direct` for fail2ban-testcases: disable lazy logging inside LogCaptureTestCase (default log-lazy is on)
2016-08-15 21:54:33 +02:00
sebres
5509ba37a2
Merge pull request #1512 from 'remotes/gh-upstream/0.9' into 0.10
2016-08-15 20:08:42 +02:00
Serg G. Brester
f61aa3225c
Merge pull request #1512 from sebres/_fix/datepattern-right-word-boundary
...
Fix ambiguous wrong recognized date pattern resp. its optional parts
2016-08-15 20:04:33 +02:00
sebres
9935cf19c1
description provided, ChangeLog entries added
2016-08-15 19:54:11 +02:00
sebres
0bdee2556f
testAmbiguousDatePattern rewritten with DateDetector/DatePatternRegex directly (moved to misctestcase.py)
2016-08-15 19:35:11 +02:00
sebres
8e09be5fc8
test cases for boundaries for date-pattern extended (negative/positive, left/right)
2016-08-15 18:53:35 +02:00
sebres
7f55be3fad
amend to b6bb2f88c1: datepattern right word boundary - prevents confusions if end of date-pattern (e.g. optional year part) misleadingly match not date values (see gh-1507)
...
test cases extended to check ambiguous "unbound" patterns in log lines (match/miss resp. positive/negative cases)
2016-08-15 16:51:55 +02:00
sebres
861fb8d463
Merge remote-tracking branch 'remotes/gh-upstream/0.10' into _0.10/optimize-setup-test-case
2016-08-15 13:53:44 +02:00
Serg G. Brester
d75af2f900
travis: coverage python 3.5 ( #1511 )
2016-08-15 13:52:32 +02:00
sebres
6fcf8192f3
code review
2016-08-15 13:51:50 +02:00
sebres
c3d1d51daf
Merge remote-tracking branch 'remotes/gh-upstream/0.9' into 0.10
2016-08-15 13:00:20 +02:00
sebres
c49fe12f70
fix fail2banregextestcase using setUpMyTime/tearDownMyTime: always use correct static time as base-time (using mock up MyTime), correct datetimes inside test
2016-08-15 12:57:39 +02:00
sebres
83029b89b9
amend to 2e530fcf72: setuptools compatibility fix - just to be sure if install_scripts will be incompatible tomorrow
2016-08-12 21:48:40 +02:00
sebres
eb72660eee
easy-fix: reset fail2ban link to python, if it targeted unavailable file
2016-08-12 21:32:18 +02:00
sebres
2e530fcf72
setuptools compatibility fix
2016-08-12 21:26:57 +02:00
sebres
fcae05190f
move common initializing functionality from fail2ban-testcases to tests/utils.py, to afford setting of default options by test execution from setup process.
2016-08-12 21:26:55 +02:00
sebres
b2ee3b120e
optimized logging using LogCaptureTestCase (new faster handler _MemHandler);
...
backwards compatibility for python 2.6 (SkipTest implemented), so options --fast and --no-network may be used now within python2.6 also;
2016-08-12 21:26:53 +02:00
sebres
461e9bab56
better handling of setup in test-cases (prevent execution of 2to3 twice, full logging in heavydebug, etc.)
2016-08-12 21:26:51 +02:00
sebres
d71a525a85
Merge branch 'master' into 0.10 (resolve conflicts and cleaning tree points after back-porting gh-1508 0.10 -> 0.9)
2016-08-12 18:51:56 +02:00
sebres
42b5a10f5d
Back-port pull request #1508 from sebres/_fix/python-executable-gh-1506 to master (0.10 -> 0.9)
2016-08-12 18:42:54 +02:00
sebres
cb340db220
ChangeLog entry for gh-1508
2016-08-12 18:37:46 +02:00
sebres
db30b7ce06
BF: prefer sys.argv[0] by retrieving of root resp. bin path: __file__ seems to be overwritten sometimes on some python versions (e.g. bug of 2.6 by running under cProfile, etc.)
2016-08-12 17:59:27 +02:00
sebres
6cdc1ce685
compatibility fix (virtualenv, running test cases in py3)
...
# Conflicts:
# MANIFEST
2016-08-12 17:59:24 +02:00
sebres
38d53a72fd
introduces new command "fail2ban-python", as automatically created symlink to python executable, where fail2ban currently installed (resp. its modules are located);
...
fixed pythonic filters and test scripts (running via "fail2ban-python" now);
fixed test case "testSetupInstallRoot" not for default python (also using direct call, out of virtualenv);
# Conflicts:
# config/filter.d/ignorecommands/apache-fakegooglebot
# fail2ban/tests/files/config/apache-auth/digest.py
# fail2ban/tests/files/ignorecommand.py
# fail2ban/tests/misctestcase.py
2016-08-12 17:58:37 +02:00
sebres
a4cef8a893
Merge branch '_fix/python-executable-gh-1506' into 0.10
2016-08-12 17:50:54 +02:00
Serg G. Brester
db24edba81
Update README.md
...
show status of builds (travis and coverage) from default branch (0.10)
2016-08-12 17:29:42 +02:00
sebres
c8e7c1f7f4
BF: prefer sys.argv[0] by retrieving of root resp. bin path: __file__ seems to be overwritten sometimes on some python versions (e.g. bug of 2.6 by running under cProfile, etc.)
2016-08-12 16:48:11 +02:00
sebres
f390a82b59
python 2.6 compatibility minor fix - no skip + BaseException.message seems to be deprecated
2016-08-11 21:37:16 +02:00
sebres
08af8de981
compatibility fix (virtualenv, running test cases in py3)
2016-08-11 21:35:13 +02:00
sebres
77f451c4a3
introduces new command "fail2ban-python", as automatically created symlink to python executable, where fail2ban currently installed (resp. its modules are located);
...
fixed pythonic filters and test scripts (running via "fail2ban-python" now);
fixed test case "testSetupInstallRoot" not for default python (also using direct call, out of virtualenv);
2016-08-11 18:34:18 +02:00
sebres
ad19c8401b
minor fix: modules are not intended to be executed directly (amend to #1426 )
2016-08-10 15:00:54 +02:00
Yaroslav Halchenko
9d70c49ea8
BF: install doc files only under Linuxes and other GNU systems ( Closes #1233 ) ( #1503 )
2016-08-09 12:49:40 +02:00
Yaroslav Halchenko
123f4ceaee
Changelog for postfix-sasl fix
2016-08-08 17:11:07 -04:00
maksyms
9ddbd642f7
Accept no space after "failed:" ( #1501 )
...
yoh: Squashed to ease cherry-picking into 0.9
* accept no space after "failed:"
fix issue #1497
* accept no space after "failed:"
* Update postfix-sasl
* Update postfix-sasl
* Update postfix-sasl
2016-08-08 17:09:47 -04:00
maksyms
04427adb95
Accept no space after "failed:" ( #1501 )
...
yoh: Squashed to ease cherry-picking into 0.9
* accept no space after "failed:"
fix issue #1497
* accept no space after "failed:"
* Update postfix-sasl
* Update postfix-sasl
* Update postfix-sasl
2016-08-08 17:07:55 -04:00
sebres
c52aaa8b78
ASSP failregex minor fixes
2016-08-08 19:06:28 +02:00
sebres
70658d7a19
Merge pull request #1494 from rhardy613/master (branch 'sebres:pr-1494')
2016-08-08 18:49:32 +02:00
rhardy613
89f8999fe5
Add changelog entry for ASSP filter changes
...
Add changelog entry for ASSP filter changes
2016-08-06 01:07:04 -04:00
rhardy613
8265e3f0f9
Fix comments
...
For some reasons the comment changes weren't pickup in the last commit.
This fixes it.
2016-08-05 23:25:15 -04:00
rhardy613
66fe5a77ce
Fix ASSP filter to work with both ASSP V1 and V2
...
ASSP V1 development stopped at the end of 2014 and it is now deprecated.
All users were urged to upgrade to ASSP V2 which is still actively
developed.
fail2ban 0.9.5 (and trunk) still have code which only understands ASSP
V1 logs.
This means the filter ignores brute force attacks against ASSP. This fix
adds V2 support.
2016-08-05 23:18:51 -04:00
rhardy613
890a3dcbb9
Fix ASSP filter to work with current release of ASSP
...
ASSP V1 development stopped at the end of 2014 and it is now deprecated.
All users were urged to upgrade to ASSP V2 which is still actively
developed. For some reason fail2ban 0.9.5 (and trunk) still have code
which only understands ASSP V1 logs. This means the filter ignores brute
force attacks against ASSP.
Now updated with anchored patterns tested against 6 months of log data.
2016-08-05 17:26:47 -04:00
Yaroslav Halchenko
c0994b0c6c
DOC: minor typo (thanks John Bernard) Closes #1496
2016-08-04 10:23:05 -04:00
sebres
eb6e3c52ae
ChangeLog entries for the last fix (cherry pick from 0.10)
2016-08-01 18:04:00 +02:00
sebres
f5b7ffeb4b
DOC: Reformatted ChangeLog into legit Markdown (after merge of master to 0.10)
2016-08-01 15:18:59 +02:00
sebres
0eea362aa0
Merge branch 'master' into 0.10
2016-08-01 15:10:52 +02:00
sebres
0083036b5f
Merge branch '0.9/gh-1492'
2016-08-01 14:45:05 +02:00
sebres
8b1225f177
several amend fixes after cherry pick from 10th branch
2016-08-01 14:07:37 +02:00
sebres
3e330604c7
several test cases rewritten using new assertIn, assertNotIn (better as own from unittest, because support generators beautifying, etc.)
...
+ new forward compatibility method assertRaisesRegexp;
+ methods assertIn, assertNotIn, assertRaisesRegexp are test covered now;
+ easy-fix for distributions compatible test cases (e.g. fedora default backend is 'systemd'), (closes gh-1353, closes gh-1490)
cherry picked from 9d56079756 (0.10 branch)
2016-08-01 13:52:05 +02:00
rhardy613
f73746d846
Fix ASSP filter to work with current release of ASSP
...
ASSP V1 development stopped at the end of 2014 and it is now deprecated.
All users were urged to upgrade to ASSP V2 which is still actively
developed. For some reason fail2ban 0.9.5 (and trunk) still have code
which only understands ASSP V1 logs. This means the filter ignores brute
force attacks against ASSP.
2016-07-31 13:50:52 -04:00
Yaroslav Halchenko
1fbb2c4c97
Merge pull request #1484 from yarikoptic/enh-pr-doc
...
DOC: added a note about choose correct branch for PR
2016-07-28 23:01:31 -04:00
Yaroslav Halchenko
1abb939233
Merge pull request #1492 from sebres/0.10-new-assert-meth
...
several test cases rewritten using new assertIn, assertNotIn
2016-07-28 23:01:02 -04:00
sebres
9d56079756
several test cases rewritten using new assertIn, assertNotIn (better as own from unittest, because support generators beautifying, etc.)
...
+ new forward compatibility method assertRaisesRegexp;
+ methods assertIn, assertNotIn, assertRaisesRegexp are test covered now;
+ easy-fix for distributions compatible test cases (e.g. fedora default backend is 'systemd'), (closes gh-1353, closes gh-1490)
cherry pick into 0.9 branch
2016-07-28 10:15:06 +02:00
Yaroslav Halchenko
d9f039df03
Merge branch 'master' of git://github.com/fail2ban/fail2ban
...
* 'master' of git://github.com/fail2ban/fail2ban:
BF: do not rely on long relative path to upstairs config - symlink dereferenced copied during install (#1485 )
2016-07-15 09:02:42 -04:00
Yaroslav Halchenko
cee09e29ec
BF: do not rely on long relative path to upstairs config - symlink dereferenced copied during install ( #1485 )
...
* BF: do not rely on long relative path to upstairs config - symlink common.conf
* Added missing files to MANIFEST
2016-07-15 09:19:45 +02:00
Yaroslav Halchenko
dca5ff44c2
Merge branch 'bf-common-zzz'
...
* bf-common-zzz:
BF: do not rely on long relative path to upstairs config - symlink common.conf
2016-07-14 22:25:07 -04:00
Yaroslav Halchenko
79616b76bf
Added missing files to MANIFEST
2016-07-14 22:19:10 -04:00
Yaroslav Halchenko
687ea8d333
BF: do not rely on long relative path to upstairs config - symlink common.conf
2016-07-14 22:15:22 -04:00
Yaroslav Halchenko
5714ac201b
DOC: preparations for 0.9.5 release
2016-07-14 21:35:49 -04:00
Yaroslav Halchenko
0f88e8a658
Added missing files to MANIFEST
2016-07-14 21:31:18 -04:00
Yaroslav Halchenko
72c4743666
Merge pull request #1481 from yarikoptic/doc-changelog
...
Doc changelog - reformatted for markdown and a bit less indentation
2016-07-14 21:23:09 -04:00
Yaroslav Halchenko
21056c995d
Merge remote-tracking branch 'origin/master' into doc-changelog
...
* origin/master:
another variant of regex
add trailing anchor to failregex
add PR id to ChangeLog
improved failregex according to @sebres recomendations
* add `__prefix_line` to regex * fix time in log file
add info to log file
added sample log lines for slapd
adding openldap slapd filter
2016-07-14 21:21:35 -04:00
Yaroslav Halchenko
c15e968c1f
DOC: added a note about choose correct branch for PR
2016-07-14 21:17:18 -04:00
Yaroslav Halchenko
5797ea0ae2
Let's work toward a2 release
2016-07-14 09:37:39 -04:00
Yaroslav Halchenko
28a0605f69
Merge pull request #1478 from gips0n/master
...
adding openldap slapd filter
2016-07-14 08:30:42 -04:00
sebres
9b03a6d42e
0.10 pre-release: MANIFEST RELEASE and man pages updates
2016-07-14 12:19:46 +02:00
sebres
41e3f2e5ed
explicit flush stdout/stderr before exit, because of possible buffered output in python (echo or grep fail2ban-client --version can sometimes returns nothing)
2016-07-14 11:35:32 +02:00
Andrii Melnyk
7433b353ee
another variant of regex
2016-07-14 10:19:21 +03:00
Andrii Melnyk
7c5828dd2a
add trailing anchor to failregex
2016-07-13 21:09:42 +03:00
sebres
683f8fc56c
Merge branch 'master' into 0.10
2016-07-13 19:41:46 +02:00
Yaroslav Halchenko
bf3188c290
Merge pull request #1413 from sebres/f2b-perfom-prepare-716-cs-0.10
...
0.10-cs: client-server rewritten as modules / start in foreground / test coverage for cs
2016-07-13 12:01:16 -04:00
sebres
f0b2cd2e39
remove no more necessary PRODUCTION from fail2banclient.py
2016-07-13 09:54:54 +02:00
sebres
53da35ea49
resolves Christmas-tree in logging (replaced with duplex space indentation)
2016-07-13 09:44:32 +02:00
sebres
ad393fcfbb
outsource assert..isStarted from setup into separate test case
2016-07-13 09:36:11 +02:00
Yaroslav Halchenko
dfcf6f1963
BF+TST: isStarted was not checking __asyncServer for exist before checking it
2016-07-12 22:53:37 -04:00
Yaroslav Halchenko
52cd8a9a96
RF: _rebindSignal helper to centralize assignment of new signal handlers + minor PEP8ing
2016-07-12 22:24:56 -04:00
sebres
0dc3db1f43
test of _kill_srv added, don't kill server if foreground;
...
pid_exists already available in Utils;
small bug and stability fixing;
2016-07-12 12:06:48 +02:00
sebres
7242c9cbde
code review after enhancements of Yaroslav
2016-07-12 12:02:05 +02:00
Yaroslav Halchenko
3c42b4f56e
minor residual cleanups
2016-07-12 00:06:41 -04:00
Yaroslav Halchenko
fcda7c9ac7
RF: revertably mock out exit call while testing new client/servers
2016-07-11 23:54:52 -04:00
Yaroslav Halchenko
1417cc99ef
RF: group common tests in base class, specialize assesment of good/bad runs per client/server
2016-07-11 23:26:30 -04:00
Yaroslav Halchenko
4df06f5352
ENH: testcases - verbosity > 2 now also includes logger name (to replace need for custom --s)
2016-07-11 22:44:47 -04:00
Yaroslav Halchenko
94cada0c6b
RF(PEP8 etc): Make new fail2banclienttestcase a bit more readable and PEP8 friendly
2016-07-11 22:42:48 -04:00
sebres
6a2b70f11d
os.path.join instead of "/" - concatenation
2016-07-11 13:26:10 +02:00
sebres
4180cc362e
code review
2016-07-11 13:22:58 +02:00
sebres
4c1bcac0c7
Merge branch '0.10' into f2b-perfom-prepare-716-cs-0.10
2016-07-11 11:28:34 +02:00
Yaroslav Halchenko
33ed71b3de
DOC: Reformatted ChangeLog into legit Markdown ( Closes #962 )
2016-07-10 19:53:54 -04:00
Yaroslav Halchenko
ec9c4a27f3
DOC: tuned up ChangeLog entries for 0.9.5
...
unified capitalized beginning of each entry
no trailing spaces or dots etc
2016-07-10 18:40:20 -04:00
Andrii Melnyk
2c5a489bc7
add PR id to ChangeLog
2016-07-08 13:55:58 +03:00
Andrii Melnyk
48c094f612
improved failregex according to @sebres recomendations
2016-07-08 13:45:10 +03:00
sebres
de5d911fd5
Merge branch 'asterisk_pjsip_2'
2016-07-08 11:47:29 +02:00
sebres
f5f204ca7c
Improved changes of gh-1458:
...
`[^']*` after callid was wrong, changed to `[^\)]*`;
regexp anchored at the end;
almost the same regex grouped to one;
Closes #1458
2016-07-08 11:45:25 +02:00
nturcksin
72a157b8f2
Improve PJSIP log support for asterisk 13+ with different callID (Squash gh-1458)
...
Change the asterisk pjsip filter to don't take the callId part
Add optional part between "Request" and "from"
Listed all log message from asterisk
2016-07-08 11:45:22 +02:00
Andrii Melnyk
dcb69b0242
* add __prefix_line to regex
...
* fix time in log file
2016-07-08 05:29:51 +03:00
Andrii Melnyk
c335663395
add info to log file
2016-07-08 05:12:25 +03:00
Andrii Melnyk
c9ab669851
added sample log lines for slapd
2016-07-08 04:56:29 +03:00
Andrii Melnyk
b2e3affaa0
adding openldap slapd filter
2016-07-08 04:50:57 +03:00
Yaroslav Halchenko
7582f13003
Merge pull request #1461 from yarikoptic/0.10
...
0.10: Freshly merged master
2016-06-20 09:44:31 -04:00
Yaroslav Halchenko
593b1210c0
Merge master (commit '0.9.4-79-gaf8b650') into 0.10
...
* commit '0.9.4-79-gaf8b650':
badip timeout option introduced, set to 30 seconds in our test cases (#1463 )
DOC: changelog for recent exim filters tune up
Asterisk pjsip (#1456 )
BF: finalize that sample log line for exim4
RF: for consistency use (?:XXX)? instead of (?:|XXX)
ENH: use non-capturing regex groups in exim-common and exim filters
ENH: exim filters -- make more use of %(host_info)s which in turn made more flexible
BF: make :port and I=[ip]:port optional for a "AUTH command used when not advertised"
2016-06-19 20:06:16 -04:00
Serg G. Brester
af8b650a37
badip timeout option introduced, set to 30 seconds in our test cases ( #1463 )
...
cherry-picked from 0.10 (little bit modified in test_badips.py, because no --fast option in test cases)
2016-06-13 12:56:53 +02:00
sebres
fd0c661a44
Merge pull request #1459 from sebres/0.10-fid-host-ip-tags
2016-06-12 15:10:24 +02:00
sebres
2efcf3c17b
increase of test coverage (+ test_IPAddr moved to one place), small bugs fixed
2016-06-10 13:17:18 +02:00
sebres
e39126f630
badip timeout option introduced, set to 30 seconds in our test cases
2016-06-10 13:15:46 +02:00
sebres
8893473d82
pypy fix: KeyError instead of IndexError by missing group
2016-06-10 11:47:24 +02:00
sebres
e40a8c8ae8
small code review
2016-06-10 11:22:14 +02:00
Yaroslav Halchenko
11f7cf5ad8
DOC: changelog for recent exim filters tune up
2016-06-07 21:38:39 -04:00
Yaroslav Halchenko
636a93f58b
Merge pull request #1438 from yarikoptic/bf-exim
...
exim filters -- make wider use of host_info helper str susbstitution + fix for #1430
2016-06-07 21:35:52 -04:00
Ludovic Gasc
f85fb45b29
Asterisk pjsip ( #1456 )
...
* Improve PJSIP log support for Asterisk 13+
* Update changelog: filter.d/asterisk.conf - fix security log support for PJSIP and Asterisk 13+
* Change pjsip regexp with sebres observation, thanks to @nturcksin
2016-06-07 11:40:35 +02:00
Yaroslav Halchenko
ced6c8307b
BF: finalize that sample log line for exim4
...
was intended in 743a531eb5 to be an entry without a port
after the [host]
2016-06-02 20:57:27 -04:00
sebres
d344274271
separated host match group and tags for ip4, ip6, dns, fid (failure-id):
...
- better recognition for usage of textToIp, expected or raw value should be used;
- separated failure id vs. host (if found use `fid` instead of `host` resp. `ip`);
- additional optional groups may be used in tags replacement by executing actions;
2016-05-31 21:55:26 +02:00
sebres
39366e703a
Merge branch 'master' into 0.10
...
# Conflicts:
# fail2ban/server/filter.py
2016-05-31 18:06:18 +02:00
sebres
b85347477f
Amend merge for pull request #1454
2016-05-31 17:47:12 +02:00
sebres
b3bb8b20bf
amend for new option of usedns=raw - forgotten validation fix inside setUseDns
2016-05-31 17:45:44 +02:00
Serg G. Brester
f23ccbda35
Merge pull request #1454 from sebres/gh-67-ban-wo-host
...
[gh-67] no-host ban
2016-05-31 16:07:06 +02:00
Yaroslav Halchenko
6434661480
RF: for consistency use (?:XXX)? instead of (?:|XXX)
2016-05-30 12:12:53 -04:00
Yaroslav Halchenko
48a8324662
ENH: use non-capturing regex groups in exim-common and exim filters
2016-05-30 11:02:12 -04:00
sebres
8ec4e1189e
use raw host (don't use textToIp) if usedns exactly raw, because usedns = no should ignore no ip failures
2016-05-30 15:34:21 +02:00
sebres
c33e25bab6
fail2ban-regex: extended with option '--raw' (switch to raw host, prevent resolving of ip)
2016-05-30 14:08:37 +02:00
sebres
b7787f4af4
use raw host (don't use textToIp) if usedns not yes or warn
2016-05-30 14:08:33 +02:00
Yaroslav Halchenko
e01cd8ab03
Merge pull request #1444 from yarikoptic/enh-courier-username
...
ENH: courier-smtp -- allow for trailing username (no spaces) in the logline
2016-05-26 19:26:35 -04:00
sebres
16d646bbb6
Merge branch 'master' into 0.10
...
empty merge, resolving conflicts after amend with cyclic recursions
2016-05-26 11:23:53 +02:00
sebres
93f776d2ee
amend for gh-1419: tags substitution bug - wrong recognition of cyclic recursion, new test cases covered this
2016-05-26 11:18:35 +02:00
sebres
858c5c0d00
Merge branch 'gh-1417'
2016-05-26 11:14:09 +02:00
sebres
a80043ce80
amend for gh-1419: tags substitution bug - wrong recognition of cyclic recursion, new test cases covered this
2016-05-26 11:13:33 +02:00
sebres
4dcf68ca1f
Merge branch 'master' into 0.10
...
# Conflicts:
# fail2ban/client/jailreader.py
# fail2ban/helpers.py
2016-05-23 15:48:46 +02:00
sebres
9df7973e95
Merge pull request #1439 from yarikoptic/enh-ignoreipsplit:
...
ENH: splitcommaspace -> splitwords allow to split ignoreip entries with new lines
2016-05-23 15:35:41 +02:00
sebres
156065e70d
splitwords: prevent to split to empty values by multiple separator characters together
2016-05-23 15:33:45 +02:00
Serg G. Brester
b6700f3e52
Merge pull request #1433 from yarikoptic/bf-0.10-pf-prevbeh
...
BF: maintain previous default beh for pf -- default ban type is multiport
2016-05-23 15:20:57 +02:00
Serg G. Brester
dcab8ab309
Merge pull request #1445 from koeppea/0.10-redunant-IPAddr-import
...
remove redundant IPAddr import
2016-05-23 14:36:19 +02:00
Alexander Koeppe
9681cd3be8
remove redundant IPAddr import
2016-05-22 10:27:36 +02:00
Yaroslav Halchenko
9bb869b8d4
ENH: courier-smtp -- allow for trailing username (no spaces) in the logline
...
Closes #1440
2016-05-21 22:17:09 -04:00
Yaroslav Halchenko
2bb2183800
Merge pull request #1443 from koeppea/correct-MANIFEST
...
correct MANIFEST file
2016-05-21 22:10:06 -04:00
Alexander Koeppe
ec7eabbd3b
correct MANIFEST file
2016-05-22 00:18:14 +02:00
Yaroslav Halchenko
01d0506ea0
ENH: splitcommaspace -> splitwords allow to split ignoreip entries with new lines
...
Closes #1432
2016-05-21 10:55:27 -04:00
Yaroslav Halchenko
8b8cf2a660
ENH: exim filters -- make more use of %(host_info)s which in turn made more flexible
2016-05-21 10:29:09 -04:00
Yaroslav Halchenko
743a531eb5
BF: make :port and I=[ip]:port optional for a "AUTH command used when not advertised"
...
Closes #1430
2016-05-21 10:29:01 -04:00
sebres
f62266659f
Merge branch 'master' into '0.10'
2016-05-21 13:48:00 +02:00
Serg G. Brester
b56f4c533e
Merge pull request #1436 from sebres/speedup-db
...
extremely speedup of all database operations
2016-05-21 13:39:48 +02:00
sebres
3d99833570
forgotten convert for bantime (str2seconds) in action, as long as it should be supplied as parameter of action executable;
...
covered via test cases now
2016-05-21 13:33:22 +02:00
sebres
1718c8dbe9
pypy: switch journal mode after upgrade (save it during the upgrade), to prevent errors like "database table is locked"
2016-05-20 15:12:32 +02:00
sebres
baafac36a4
ChangeLog entry
2016-05-20 14:51:13 +02:00
sebres
db9e724038
extremely speedup of all database operations:
...
- (synchronous = OFF) write data through OS without syncing
- (journal_mode = MEMORY) use memory for the transaction logging
2016-05-20 12:06:04 +02:00
sebres
34ae0b916e
Merge pull request #1421 from sebres/fix-1405
...
filter.d/common.conf: fixes unexpected extra regex-space in generic `__prefix_line` (gh-1405)
2016-05-20 11:20:34 +02:00
sebres
caecb2080b
Merge pull request #1435 from sebres/fix-1434
...
fixed --pidfile bug, introduced in gh-1322
2016-05-20 11:02:42 +02:00
sebres
932708de9e
fixed --pidfile bug, introduced in gh-1322:
...
gentoo-initd fixed --pidfile bug: `--pidfile` is option of start-stop-daemon, not argument of fail2ban (see gh-1434)
closes gh-1434
2016-05-20 11:01:00 +02:00
sebres
52377984cd
back to mandatory space, ungrouping of sub parameters in __prefix_line + small code review;
2016-05-19 17:57:48 +02:00
sebres
0fdc56546f
Fixed misunderstanding of port in (ban)action: port will be always specified in jail config ([DEFAULT] or jail)
2016-05-19 17:45:41 +02:00
Yaroslav Halchenko
1ebc3facb1
BF: maintain previous default beh for pf -- ban a port (ssh) only
2016-05-19 17:14:33 +02:00
sebres
4cdca8c258
amend-merge for pull request #1429 from sebres/0.10-freebsd-fix-pf
...
actiontype for PF action (all- and multi port)
2016-05-19 14:52:10 +02:00
sebres
4d51c591c1
pf.conf: warranted consistently echoing for the pf actiontype if actiontype or multiport tags will be customized;
2016-05-19 14:50:41 +02:00
Serg G. Brester
01d9a41ba1
Merge pull request #1429 from koeppea/0.10-freebsd-fix-pf
...
actiontype for PF action (all- and multi port)
2016-05-18 11:12:31 +02:00
Alexander Koeppe
b5e031f3c3
some documentation for multiport use in pf.conf
2016-05-17 21:32:21 +02:00
Serg G. Brester
482e1abe9c
Merge pull request #1431 from sebres/0.10-muti-option-groups
...
jailreader: support multiple option groups (brackets)
2016-05-17 21:17:12 +02:00
sebres
1e7fd26f5f
rename actionoptions to actiontype in pf-action (multiport) + fixed test cases
2016-05-17 20:51:12 +02:00
sebres
25af11215b
test case for generic common moved to ./fail2ban/tests/config/filter.d/zzz-generic-example.conf to prevent shipping it with fail2ban installations
2016-05-17 20:08:46 +02:00
Yaroslav Halchenko
af1cc41053
Merge pull request #1426 from koeppea/0.10-freebsd-fix-shebang
...
no hardcoded python interpreter path
2016-05-17 13:50:26 -04:00
Alexander Koeppe
e74047ae49
revert to common config for PF covering multi and allports
2016-05-17 18:19:40 +02:00
Alexander Koeppe
3e1328c83b
split PF config files between all- and multi port
2016-05-17 18:19:27 +02:00
sebres
c6f63c7263
jailreader: support multiple option groups, syntax action = act[p1=...][p2=...] + test case for it
...
(see gh-1425, gh-1429)
2016-05-17 18:06:46 +02:00
Alexander Koeppe
5e06e8be62
removed shebang and changed mode for fail2banregex.py
2016-05-17 16:42:23 +02:00
sebres
06dcad7650
fixed mixed indentation (spaces through tabs), duplicate code removed
2016-05-17 12:27:01 +02:00
Yaroslav Halchenko
d7ff7d18cd
RF+ENH: @with_kill_srv fixture to kill_srv in the tests
2016-05-17 12:26:58 +02:00
Yaroslav Halchenko
e57321ab1e
BF+ENH: import signal used in the code, withtmpdir -> with_tmpdir (more readable)
...
case shows how evil except Exception can be ;)
2016-05-17 12:26:56 +02:00
sebres
6353de8b0f
possibility to increase verbosity up to heavy debug (command line parameter -vvv)
2016-05-17 12:26:54 +02:00
sebres
cb4f9be8b2
the date brackets removed from filters using __prefix_line, because __prefix_line already contains the date ambit;
2016-05-17 11:55:02 +02:00
sebres
de813acf51
extends generic __prefix_line with optional brackets for the date ambit (gh-1421), added new parameter __date_ambit + test case added;
2016-05-17 11:54:43 +02:00
Alexander Koeppe
975608dfb6
no hardcoded python interpreter path
2016-05-15 21:08:32 +02:00
sebres
be3e95b76d
Merge branch '0.10-fwcmd-fix-test' into 0.10
2016-05-14 15:05:21 +02:00
sebres
0c44ecfc77
action.d/firewallcmd-ipset.conf: different name of the match set's for IPv4/IPv6, using conditional <ipmset>, analog to the iptables-ipset;
...
test cases for 3 firewallcmd extended;
2016-05-14 15:01:35 +02:00
Serg G. Brester
0d0e1853c4
Merge pull request #1424 from TorontoMedia/firewallcmd
...
ENH: Branch 0.10 - updated firewallcmd actions
2016-05-14 13:34:23 +02:00
Serg G. Brester
e0da359a5a
Merge pull request #1423 from yarikoptic/0.10
...
ENH: version Fail2Ban in this branch as 0.10.0 alpha 1
2016-05-14 13:26:23 +02:00
Serg G. Brester
d742bc2834
Merge pull request #1422 from sebres/0.10-fix-multi-set
...
0.10 fix multi-set and database binding parameters
2016-05-14 13:25:14 +02:00
TorontoMedia
ffebde68e0
Update firewallcmd-multiport.conf
2016-05-13 22:38:36 -04:00
TorontoMedia
07de83e04a
Update firewallcmd-common.conf
2016-05-13 22:38:10 -04:00
TorontoMedia
810d5996b5
Update firewallcmd-rich-logging.conf
2016-05-13 22:10:25 -04:00
TorontoMedia
7e54cee8d6
updated firewallcmd actions
2016-05-13 21:36:27 -04:00
Yaroslav Halchenko
2b6f8737a7
ENH: version Fail2Ban in this branch as 0.10.0 alpha 1
2016-05-13 17:17:46 -04:00
sebres
d420148055
database: always explicit convert ip to str, because may be an IPAddr, that will be unsupported type by bind parameter (as long as we've found any default wrapper handler for sqlite3)
2016-05-13 22:53:57 +02:00
sebres
cb280b817f
csocket multi-set fix: prevent to convert list, dict, set during transfer (send), this offers a sending of 'multi-set' arrays
...
(missed by cherry-picking from multi-set branch)
2016-05-13 22:43:02 +02:00
sebres
e0924e0d1b
test case fix (always sort result of DNSUtils.textToIp, because order of result from socket.getaddrinfo is undefined (system depended)
2016-05-13 21:44:07 +02:00
sebres
3e49522b7a
fixes unexpected extra regex-space in generic __prefix_line (gh-1405, misleadingly committed in d2a9537568);
...
all optional spaces normalized in generic include `common.conf` + test cases are extended (using new example pseudo-filter and test log `zzz-generic-example`);
2016-05-13 20:26:37 +02:00
Yaroslav Halchenko
d6eae28eb5
Merge pull request #1419 from sebres/gh-1417
...
fixes gh-1417 Grave tags substitution bug. [part. cherry-picked from 0.10]
2016-05-13 10:28:29 -04:00
sebres
cce63926ce
ChangeLog entry added
2016-05-13 16:11:38 +02:00
sebres
a4b8f6e49e
[part. cherry-picked from 0.10] invalid recursion check in substituteRecursiveTags: for example action bsd-ipfw produced ValueError('properties contain self referencing definitions and cannot be resolved...')
...
test cases extended for exactly this case;
closes gh-1417
2016-05-13 14:12:17 +02:00
sebres
3d3735706b
invalid recursion check in substituteRecursiveTags: for example action bsd-ipfw produced ValueError('properties contain self referencing definitions and cannot be resolved...')
...
test cases extended for exactly this case and for all stock actions;
closes gh-1417
2016-05-13 13:53:29 +02:00
Serg G. Brester
1791fd59f2
Merge pull request #1418 from yarikoptic/pr-1415
...
DOC: minor PEP8ing and comments enhancements
2016-05-13 12:49:35 +02:00
Yaroslav Halchenko
a9c563fed2
Merge pull request #1415 from sebres/0.10-fixes
...
0.10 fixes
2016-05-12 18:54:33 -04:00
Yaroslav Halchenko
14c31d8c58
DOC: minor PEP8ing and comments enhancements
2016-05-12 18:52:20 -04:00
sebres
ec6032d934
prevent to fail stock configs test case, if any jail custom config does not have own test log-file (perhaps not clean copy)
2016-05-12 18:15:22 +02:00
sebres
4b5b16cd9f
allow using of IPv6 address style mask (analog to the IPv4), for example: 2606:28ff::/ffff:ff80:: -> 2606:2880::/25
...
fast calculating of maskplen using map table MAP_ADDR2MASKPLEN, with pre-calculated addr->maskplen values;
test cases extended;
2016-05-12 18:15:05 +02:00
sebres
0c2eeee8c7
BF: fail2ban-client can't unserialize IPAddr objects - added IPAddr pickle-handler, that simple wrap IPAddr to the str
2016-05-12 12:54:25 +02:00
sebres
53956501da
increase readability and details level by increased verbosity
2016-05-12 11:53:12 +02:00
sebres
060ea085f4
reader bug fix: prevent to silent "load" of not existing jail;
...
coverage of test cases increased;
2016-05-12 11:52:08 +02:00
sebres
22576d7150
code review, timeout fix, better tracing (and test coverage) by start of server/client (with or without fork)
2016-05-12 11:52:05 +02:00
sebres
0b4143730d
some compatibility fixes (prevent forking of testcase-process, code review), wait 4 server ready, test cases fixed (py2/py3)
2016-05-12 11:52:02 +02:00
sebres
2fcb6358ff
several bug fixed: fork in client-server test cases prohibited, all worker threads daemonized (to prevent hanging on exit).
2016-05-12 11:51:59 +02:00
sebres
afa1cdc3ae
client/server (bin) test cases introduced, ultimate closes #1121 , closes #1139
...
small code review and fixing of some bugs during client-server communication process (in the test cases);
2016-05-12 11:51:56 +02:00
sebres
5a053f4b74
starting of the server (and client/server communication behavior during start and daemonize) completely rewritten:
...
- client/server functionality moved away from bin and using now the common interface (introduced in fail2bancmdline);
- start in foreground fixed;
- server can act as client corresponding command line;
- command "restart" added: in opposite to "reload" in reality restarts the server (new process);
- several client/server bugs during starting process fixed.
2016-05-12 11:51:53 +02:00
sebres
556ddaabd7
temporary commit (move client/server from bin)
2016-05-12 11:51:50 +02:00
sebres
4ce240ed40
try to start server in foreground
...
# Conflicts:
# fail2ban/server/server.py
2016-05-12 11:51:47 +02:00
sebres
bdc2d07946
fix suhosin_log in common paths - log files should be separated using "\n":
...
prevents to throw an error "File option must be 'head' or 'tail'", if jail suhosin will be enabled.
2016-05-11 18:49:04 +02:00
sebres
9b72522a01
todo fix: not necessary in 0.10 branch
2016-05-11 18:47:55 +02:00
sebres
3df97beaa6
changelog entries from sebres:f2b-perfom-prepare-716 (gh-1346)
2016-05-11 18:03:22 +02:00
sebres
c22ba5413d
changes from ipv6-support-0.10 after merge
2016-05-11 16:58:13 +02:00
sebres
f9ea845595
Merge branch 'ipv6-support-0.10' into 0.10
2016-05-11 16:57:16 +02:00
sebres
23ad50dbaa
correct <HOST> expression in failregex (now IPv6 will be really found from filter);
...
respect standard spelling of IPv6 (with port) enclosed in brackets ([ipv6]:port), to prevent the necessarily changing of many filter definitions, comparison:
#IPv4:
127.0.0.1:55555
#IPv6:
[a:b:c:d::1]:55555
some small fixes (in test cases also) and code review and few optimizations;
2016-05-11 16:55:29 +02:00
sebres
f47fdf8918
code coverage: extend conditional test with direct replacement inside replaceTag (besides recursive sub tags)
2016-05-11 16:55:26 +02:00
sebres
e8203dabba
python 2.6 compatible test cases
2016-05-11 16:55:24 +02:00
sebres
9da7bb1068
meantime commit: code review, simplification, pythonization, etc. (test cases passed)
2016-05-11 16:55:21 +02:00
Alexander Koeppe
50e5a7e538
More beautifier tests
2016-05-11 16:55:17 +02:00
sebres
d65e37e93d
CIDR splitting functionality moved from filter to IPAddr;
...
meantime commit: code review, simplification, pythonization, etc. + test cases extended
2016-05-11 16:54:36 +02:00
Alexander Koeppe
1b21f21c22
CIDR represenation if IPAddr object is a network prefix
2016-05-11 16:54:33 +02:00
sebres
941a2b6c82
clean up unnecessarily resp. directly unused action properties, because they are ambiguous now;
...
implemented caching functionality for same substitutions inside replaceTag: very actual and extreme performance growth (up to 1000 times) for ban/unban because too slow substituteRecursiveTags by several tags and many includes, but totally unnecessary as long as parameters are not changing;
2016-05-11 16:54:31 +02:00
sebres
504e5ba6f2
actions support IPv6 now:
...
- introduced "conditional" sections, see for example `[Init?family=inet6]`;
- iptables-common and other iptables config(s) made IPv6 capable;
- several small code optimizations;
* all test cases passed (py3.x compatible);
2016-05-11 16:54:28 +02:00
sebres
75028585c0
test cases extended for verifying ipv4/ipv6, normalized pf-action with test case
2016-05-11 16:54:25 +02:00
Alexander Koeppe
ed2f3ef77d
improve PF action and make IPv6 aware
2016-05-11 16:54:22 +02:00
sebres
1a6450643d
partially cherry pick from branch 'multi-set', prepare for conditional config parameters logic:
...
- new readers logic (group some by multiple parameters 'set' -> 'multi-set';
- prevent to add 'known/' parameters twice (by merge section etc);
- test cases fixed;
# Conflicts:
# fail2ban/client/actionreader.py
2016-05-11 16:54:20 +02:00
sebres
43c0f3cdc4
test cases extended
2016-05-11 16:54:17 +02:00
sebres
2497b05abc
test cases preliminary extended;
2016-05-11 16:54:14 +02:00
sebres
25d6cf8dd2
fix suhosin_log in common paths - log files should be separated using "\n":
...
prevents to throw an error "File option must be 'head' or 'tail'", if jail suhosin will be enabled.
2016-05-11 16:54:11 +02:00
sebres
9b06c325e1
2nd wave: code review, simplification, pythonization, etc. (test cases passed)
2016-05-11 16:53:26 +02:00
Yaroslav Halchenko
c1a54974e9
RF/ENH: 1st wave of IPAddr pythonization - properties, logical statements, etc
...
# Conflicts:
# fail2ban/server/ipdns.py
2016-05-11 16:48:42 +02:00
Yaroslav Halchenko
5040c95bdb
DOC: stub for 0.10.0 release changelog
2016-05-10 21:17:09 -04:00
Alexander Koeppe
dbd7e347b1
new testcase to test beautifier code
2016-05-09 17:08:35 +02:00
Alexander Koeppe
4274ae89c6
Quite little adjustments on tests and return value
...
# Conflicts:
# fail2ban/server/ipdns.py
2016-05-09 17:07:53 +02:00
sebres
8cb4a3f59e
move DNTUtils, IPAddr related code to dedicated source file ipdns.py (also resolves some cyclic import references)
2016-05-09 17:06:25 +02:00
sebres
6985531e91
meantime commit: code review, simplification, pythonization, etc. (test cases passed)
2016-05-09 16:35:48 +02:00
Alexander Koeppe
9ede535a61
remove obsolete IP related code from DNSUtils class
...
# Conflicts:
# fail2ban/server/filter.py
2016-05-09 15:36:15 +02:00
Alexander Koeppe
ce196744d1
Update ChangeLog / THANKS entries
2016-05-09 15:34:15 +02:00
Alexander Koeppe
db9f3f738f
add ip6-loopback to default ignoreip statement
2016-05-09 15:32:42 +02:00
Alexander Koeppe
d125f882d4
explicitely treat join arguments as string in beautifier
2016-05-09 15:29:05 +02:00
sebres
afe1f73af2
meantime commit: code review, simplification, pythonization, etc. (test cases passed)
...
unnecessarily code aggravation with explicit converting reverted - implicit converting inside internal functions if not IPAddr object;
2016-05-09 15:28:21 +02:00
Alexander Koeppe
85b895178b
change IP address string to object handling part 1
...
# Conflicts:
# fail2ban/server/filter.py
2016-05-04 14:07:12 +02:00
sebres
07c9f38e45
meantime commit: code review, simplification, pythonization, etc. (test cases passed)
2016-05-04 14:02:03 +02:00
Alexander Koeppe
a757037671
Make DNS resolution IP address family idependent
2016-05-04 13:51:15 +02:00
sebres
3893a6b780
meantime commit: code review, simplification, pythonization, etc.
2016-05-04 13:50:37 +02:00
Alexander Koeppe
a093828602
Make ignoreip checking address family idependent
2016-05-04 12:53:56 +02:00
sebres
1308744348
meantime commit: code review, simplification, pythonization, etc.
2016-05-04 12:53:34 +02:00
Alexander Koeppe
01e1383c9b
New class IPAddr for handling IPv4 and IPv6 addresses
2016-05-04 12:21:48 +02:00
sebres
05f38285f1
Merge remote-tracking branch 'remotes/gh-upstream/master' into f2b-perfom-prepare-716
2016-05-02 15:40:05 +02:00
Yaroslav Halchenko
9664406719
Merge pull request #1404 from Aeyoun/patch-1
...
Assert https not http
2016-04-30 12:23:47 -04:00
Daniel Aleksandersen
75eb240846
Assert https not http
...
Resolves test regression from issue #1395 .
2016-04-30 16:18:56 +02:00
Yaroslav Halchenko
2948026a60
Merge pull request #1395 from Aeyoun/patch-2
...
Use HTTPS in Debuggex URLs
2016-04-27 21:14:16 -04:00
Yaroslav Halchenko
d7b0a2f249
Merge pull request #1397 from jungle-boogie/patch-1
...
update doc url
2016-04-27 21:13:55 -04:00
Yaroslav Halchenko
d2f1de5da8
Merge pull request #1400 from yarikoptic/bf-cymru
...
BF+ENH: fixed up testing querying cymru information + assert_dict_equal
2016-04-27 08:36:42 -04:00
Yaroslav Halchenko
340a5a23f4
BF+ENH: fixed up testing querying cymru information + assert_dict_equal helper
2016-04-26 09:30:36 -04:00
jungle-boogie
d889918f19
update doc url
...
direct to confluence page. no code changes.
2016-04-24 21:35:18 -07:00
Daniel Aleksandersen
add67227f4
Use HTTPS in Debuggex URLs
2016-04-24 02:20:02 +02:00
Yaroslav Halchenko
aa303acfd6
Merge pull request #1381 from theDogOfPavlov/patch-3
...
Tightened up exim regexes to catch rDNS entries
2016-04-23 18:27:38 -04:00
sebres
e595fefc9b
change log and thanks entries
2016-04-14 14:50:17 +02:00
Alexandre Perrin
7712310d2d
Be more backward compatible on matching postfix/smtps/smtpd
...
Support trailing smtps also and not only smtpd.
suggested by @sebres
2016-04-14 13:54:58 +02:00
Alexandre Perrin
1a299409e5
Fix postfix/smtps/smtpd matching.
2016-04-14 12:10:58 +02:00
Alexey Korepanov
5773eb71b8
ensure /var/run/fail2ban is created in systemd service file
2016-04-12 21:20:19 +01:00
theDogOfPavlov
fcca1413b0
rDNS tests
...
added additional tests to cover logs with rDNS
2016-04-01 18:47:19 +01:00
theDogOfPavlov
1eb51b1bc2
Tightened up regexes to catch rDNS entries
2016-04-01 18:07:01 +01:00
Yaroslav Halchenko
1153c0a5c6
Merge pull request #1359 from yarikoptic/bf-blocktype
...
BF: Include iptables-common (not removed iptables-blocktype) within firewallcmd- actions
2016-04-01 07:19:28 -04:00
sebres
9d7e860edb
possibility to increase verbosity up to heavy debug (partial ported from 716-cs)
2016-04-01 10:38:11 +02:00
Yaroslav Halchenko
db2dd070ad
Merge pull request #1356 from opoplawski/bug-1354
...
Fedora use mariadb by default, fix log path
2016-03-31 22:11:10 -04:00
Serg G. Brester
b9b7ecbf6b
Merge pull request #1357 from sebres/monit-new-fltr
...
monit filter fixup for the new version (gh-1355)
2016-03-26 11:39:26 +01:00
TorontoMedia
3d239215cd
Two new firewalld actions with rich rules for firewalld-0.3.1+ (gh-1367)
...
closes #1367
2016-03-25 17:28:30 +01:00
sebres
ac27c9cb96
Merge branch 'patch-2' (gh-1371)
2016-03-25 17:05:23 +01:00
Serg G. Brester
0effe76971
Merge pull request #1370 from theDogOfPavlov/patch-1
...
Added regex for LDAP authentication failures
2016-03-25 15:30:39 +01:00
Serg G. Brester
fad4121709
Merge pull request #1365 from jblachly/sshd-pam-failed
...
SmartOS PAM Authentication failed (not failURE)
2016-03-24 13:47:49 +01:00
jblachly
e9202fa0b2
Placed failure (illumos) at end of regex
2016-03-24 00:43:15 -04:00
theDogOfPavlov
33ef2311e7
added tests to cover exim regex additions
2016-03-23 11:58:03 +00:00
theDogOfPavlov
28e246b5d7
added note to cover additional exim filters
2016-03-23 11:52:09 +00:00
theDogOfPavlov
42f43d0f8a
added note to cover dovecot ldap regex
2016-03-23 11:51:12 +00:00
theDogOfPavlov
eaf6bbb08f
add test to catch LDAP auth failures
2016-03-23 11:47:31 +00:00
theDogOfPavlov
fe1475be95
Additional exim regexes to cover common attacks...
2016-03-21 05:59:59 +00:00
theDogOfPavlov
cf2aa9c1c0
Added regex for LDAP authentication failures
2016-03-21 05:53:23 +00:00
jblachly
25c2334bc8
SmartOS PAM Authentication failed (not failURE)
...
SmartOS (and likely other Illumos platforms) enter log entries for failed sshd logins of the form:
`Authentication failed for USER from HOST`
The current sshd.conf regex matches `failure` -- add to this a match for `failed` to support Illumos
2016-03-16 13:52:01 -04:00
Yaroslav Halchenko
bfac42eb2e
changelog for journalmatch pure-ftpd
2016-03-14 11:10:28 -04:00
Yaroslav Halchenko
86024f745b
Merge pull request #1362 from weberhofer/patch-2
...
define journalmatch setting for pure-ftps
2016-03-14 11:09:16 -04:00
Johannes Weberhofer
bd25a43417
define journalmatch setting for pure-ftps
2016-03-11 18:19:53 +01:00
sebres
74b88e1706
fix sporadic bugs by starting of fast actions (execute fast sub processes), cherry picked from "f2b-perfom-prepare-716-cs":
...
- missing `popen` variable if not started;
- better readability for stdout and stderr in log (+ check log level before do logging);
2016-03-10 15:10:26 +01:00
sebres
01b379ab2e
fix sporadic bugs within asyncserver, cherry picked from "f2b-perfom-prepare-716-cs":
...
- differentiate between in loop and active (reset active only after really leaves a loop);
- differentiate between foreign and self loop-thread by stop/close connection;
- stops logging connection errors if too many errors;
- safe remove socket (no sporadic errors if too fast start/stop occurred);
2016-03-10 15:09:54 +01:00
Yaroslav Halchenko
eed1a0d686
BF: Include iptables-common (not removed iptables-blocktype) within firewallcmd- actions ( Closes #1254 )
2016-03-09 23:06:59 -05:00
Yaroslav Halchenko
deca0b80ab
ENH: removed double tab indentation, pass use_poll into loop, reorderd log msg to come after action to be factually correct
2016-03-09 22:22:29 -05:00
Yaroslav Halchenko
c84b6370c5
ENH: remove some code duplication, enhance docstrings, uniformize naming
2016-03-09 22:22:29 -05:00
Yaroslav Halchenko
7eafb0c206
ENH: avoid subclassing dict (in favor of delegating) if not entire interface is used/adjusted
...
since otherwise use of dict"s __getitem__ could lead to undesired effects etc
2016-03-09 22:22:29 -05:00
Orion Poplawski
f3f813a925
- mysqld does not log login attempts to the journal.
...
- Add /var/log/mysqld.log to mysql_log
2016-03-09 13:52:50 -07:00
sebres
9d13bb0c3a
ChangeLog and THANKS entries
2016-03-09 20:11:14 +01:00
sebres
37c9075fad
fixed monit filter: failregex find now both previous and new versions:
...
- failregex of previous monit version merged as single expression;
- extended failregex with new monit "access denied" version;
2016-03-09 20:06:14 +01:00
Orion Poplawski
dfc65018da
Fedora use mariadb by default, fix log path
2016-03-09 11:36:06 -07:00
Yaroslav Halchenko
d533c0761d
Merge pull request #1349 from yarikoptic/bf-tests-use-configdir
...
BF: use tests.utils.CONFIG_DIR instead of fixed one (Closes #1348 )
2016-03-08 09:11:34 -05:00
Yaroslav Halchenko
634e68036e
Get ready for further developments
2016-03-08 08:36:29 -05:00
Yaroslav Halchenko
bb0dc17a87
BF: use tests.utils.CONFIG_DIR instead of fixed one ( Closes #1348 )
2016-03-07 22:40:36 -05:00
Yaroslav Halchenko
0298ba2c1b
MANIFEST RELEASE and man pages updates
2016-03-07 21:50:10 -05:00
Yaroslav Halchenko
5ffc15ac68
Changes for the 0.9.4 release
2016-03-07 21:45:44 -05:00
sebres
d7e7b52013
Merge remote-tracking branch 'remotes/gh-upstream/master' into f2b-perfom-prepare-716
2016-03-07 19:11:36 +01:00
Yaroslav Halchenko
150007b128
Merge pull request #1345 from sebres/dd-epoch-time-fix
...
datedetector: epoch time expression fix
2016-03-07 13:05:11 -05:00
sebres
e075815833
datedetector: epoch time expression fix (now 10-11 chars, only whole number - anchored ^...\b or by special case within [], audit()) + test cases extended (positive/negative)
2016-03-07 17:57:22 +01:00
sebres
dca3db941e
merge getTime2 functionality to getTime
2016-03-07 17:28:37 +01:00
Yaroslav Halchenko
19850d71e9
changelog about gentoo initd
2016-03-07 10:52:47 -05:00
Yaroslav Halchenko
5106b5943a
Merge pull request #1322 from jsuter1/master
...
gentoo-initd: Use start-stop-daemon in order to handle crashes better
2016-03-07 10:51:14 -05:00
Yaroslav Halchenko
385b50e4a9
Merge pull request #1343 from denics/master
...
adding wp-admin to bot search
2016-03-07 10:23:37 -05:00
Yaroslav Halchenko
ec54b74921
Merge pull request #1338 from yarikoptic/enh-return-mysql-suffix-back
...
Enh return mysql suffix back
2016-03-07 10:21:26 -05:00
Denix
ed0e572bfc
added wp-admin
...
bot are very annoying and I am getting a lot of checks on wp-admin. This should calm them.
2016-03-02 16:52:03 +01:00
Denix
04e932baa2
Merge pull request #1 from fail2ban/master
...
sync fork
2016-03-02 16:48:51 +01:00
Yaroslav Halchenko
a11c878fb2
ENH(TST): a hypothetical example to show/test needing trailing anchoring
2016-02-28 12:12:36 -05:00
Yaroslav Halchenko
6ffbc1ffad
ENH: revert back to having detailed suffix anchored at the end for mysqld-auto.conf
...
As discussed in https://github.com/fail2ban/fail2ban/pull/1333#discussion_r54100127
2016-02-28 12:07:46 -05:00
Yaroslav Halchenko
2adf5855ac
Changelog for the recent PR and added Tom to THANKS
2016-02-28 12:03:13 -05:00
Yaroslav Halchenko
3e31145c33
Merge pull request #1331 from whyscream/postfix-multi-instance-support
...
Add support for matching postfix multi-instance daemon names by default
2016-02-28 12:00:24 -05:00
sebres
667785b608
mysqld: failregex fixed (accepts different log level, more secure expression now);
...
closes #1332
2016-02-24 17:17:51 +01:00
Tom Hendrikx
6c606cf98f
Add support for matching postfix multi-instance daemon names by default
2016-02-23 20:23:04 +01:00
Yaroslav Halchenko
bd822d02a4
DOC: removed Nick from listed as FreeBSD maintainer
2016-02-22 09:13:30 -05:00
Yaroslav Halchenko
8b00ca2744
Merge pull request #1327 from yarikoptic/enh-cov-templates
...
ENH: use codecov + templates for PRs and issues
2016-02-21 09:56:17 -05:00
Yaroslav Halchenko
705b91e6a7
DOC: adjusted ISSUE_TEMPLATE.md picking on @sebres's version
2016-02-20 11:20:33 -05:00
Yaroslav Halchenko
9667c4cb42
ENH: github templates for issues and PRs
2016-02-17 21:20:51 -05:00
Yaroslav Halchenko
72638975a9
ENH: add codecov support to travis.yml and bandge to README.md
2016-02-17 20:43:50 -05:00
Jack Suter
fb779a78c5
gentoo-initd: Use start-stop-daemon in order to handle crashes better
...
Currently, if fail2ban is killed (or crashes), its status will be
reported by '/etc/init.d/fail2ban status' as 'running' even though it
is not. Attempting to restart the service also fails, because Gentoo
unsuccessfully tries to stop the service.
By using start-stop-daemon and providing a pidfile, Gentoo will
instead report the status as 'crashed' and allow the service to be
restarted as normal.
2016-02-16 01:46:27 -05:00
Yaroslav Halchenko
905c87ca4a
Merge pull request #1310 from yarikoptic/pr-1288
...
NF: HAProxy HTTP Auth filter
2016-02-11 08:35:48 -05:00
Yaroslav Halchenko
3dc57af19c
Merge branch 'logrotate' of https://github.com/sbraz/fail2ban
...
* 'logrotate' of https://github.com/sbraz/fail2ban :
Remove compression and count from logrotate
2016-02-10 18:41:01 -05:00
Yaroslav Halchenko
09bc2e978d
Merge pull request #1319 from sebres/asterisk-gh1309
...
Asterisk regexp fix to catch phone # and relax trailing anchoring
(replacement for Update asterisk.conf gh-1309)
2016-02-08 10:58:53 -05:00
sebres
d8e81eb417
regexp rewritten (few vulnerable as previous) + test case added
2016-02-08 12:01:25 +01:00
3eBoP
257b7049d8
Update asterisk filter: changed regex for "Call from ...". Sometimes extension can have a plus symbol (+) because they can be phone number.
...
Closes #1309
2016-02-08 11:51:37 +01:00
Pierre GINDRAUD
b5a07741c8
Add new regex into postfix filter. The new regexp is able to detect bad formatted SMTP EHLO command
2016-02-08 11:11:59 +01:00
Yaroslav Halchenko
b435e1e4c8
Merge pull request #1311 from sbraz/gentoo-init
...
gentoo-initd: do not hide useful output
2016-01-29 09:54:35 -05:00
Louis Sautier
869d99dd37
Remove compression and count from logrotate
...
Initially reported at https://bugs.gentoo.org/show_bug.cgi?id=549856
2016-01-29 00:15:48 +01:00
Louis Sautier
294a7790a9
gentoo-initd: do not hide useful output
...
Gentoo applies a patch for this: https://bugs.gentoo.org/show_bug.cgi?id=536320
2016-01-28 23:40:36 +01:00
Yaroslav Halchenko
3f437b32db
Merge remote-tracking branch 'pr/1288/head'
...
* pr/1288/head:
Update haproxy-http-auth.conf
Added HAProxy HTTP Auth filter
Conflicts:
config/jail.conf - resolved + removed unnecessary filter/enabled (defaults should be as good)
2016-01-28 08:51:45 -05:00
Yaroslav Halchenko
377ea32441
Merge pull request #1295 from obounaim/master
...
The sender option is ignored by some actions
2016-01-28 08:48:22 -05:00
Serg G. Brester
fe14c8fa05
Merge pull request #1292 from albel727/master
...
Add nftables actions
2016-01-24 23:55:50 +01:00
Jordan Moeser
d7b46509d8
Update haproxy-http-auth.conf
...
Updated failregex to be more strict
2016-01-12 08:37:33 +10:00
local
58a8736e0f
Updating changelog.
2016-01-10 00:10:05 +01:00
local
40c0bed82c
action_mw, action_mwl, action_cf_mwl ignore the "sender" option when sending a notification email.
...
This commit adds "sender="%(sender)s"" to the three actions to correct this issue.
2016-01-10 00:05:03 +01:00
Yaroslav Halchenko
5d0d96a5cb
Merge pull request #1286 from yarikoptic/enh-jail
...
ENH: harmonize jail.conf + 1 more test that passed bantime is non-degenerate and int
2016-01-08 08:51:08 -05:00
Alexander Belykh
985e8938a4
Refactor nftables actionstop into smaller parts
2016-01-06 17:39:54 +06:00
Alexander Belykh
9779eeb986
Add nftables_type/family/table parameters
2016-01-06 17:33:14 +06:00
Alexander Belykh
260c30535d
Escape curly braces in nftables actions
2016-01-06 17:13:30 +06:00
Alexander Belykh
1983e15580
Add empty line between parameters in nftables-common.conf
2016-01-06 16:55:29 +06:00
Alexander Belykh
cb2d70d7a8
Add ChangeLog entry for new nftables actions
2016-01-05 19:04:44 +06:00
Alexander Belykh
f7f91a8bd4
Refactor common code out of nftables-multiport/allports.conf
2016-01-05 19:03:47 +06:00
sebres
25a09352e4
+ ChangeLog entry
2016-01-04 14:46:43 +01:00
sebres
69f5623f83
code simplifying (remove duplication): agent will be always supplied as parameter from jail.conf
2016-01-04 09:30:32 +01:00
Alexander Belykh
618e97bce8
Add nftables actions
2016-01-04 01:36:28 +06:00
sebres
ac31121432
amend to fix fail2ban-version: correct user-agent for badips.py "Fail2Ban/ver", changeable within jail/config now;
2015-12-31 02:32:17 +01:00
Jordan Moeser
e133762a28
Added HAProxy HTTP Auth filter
2015-12-31 11:16:23 +10:00
sebres
cf334421bd
Provides fail2ban version to jail (as interpolation variable during parse of jail.conf);
...
BF: use `fail2ban_agent` as user-agent in actions badips, blocklist_de, etc. (closes #1271 , closes #1272 )
2015-12-31 01:38:25 +01:00
Yaroslav Halchenko
b76aede40d
ENH(TST): verify that passed bantime is non-0 and int
2015-12-29 20:22:06 -05:00
Yaroslav Halchenko
28c9832293
RF: harmonize jail.conf (no explicit enabled=false in jails, match filter name for screesharingd, etc)
2015-12-29 19:43:52 -05:00
Yaroslav Halchenko
69aa1feac0
Merge "Mac OS Screen Sharing filter" PR 1232
...
* pr/1232/head:
removed system.log
Removed old svn revision comment
removed false matches
Removed includes comment for screensharing jail
Now using a literal logpath for screensharing jail
Fixed blatant typo in regex
clarified comments on sample log format
Fixed name (again?)
Made screensharing jail off by default
Changed regex prequel
added entry for new screensharingd filter
name change & new sample data
Added json metadata
Sample log for test case
Replaced .* with literal
Update jail.conf
Added new path variable for system.log
Added in settings for screensharingd filter
Created file
Conflicts:
ChangeLog - moved to New Features
config/jail.conf - kept at the end
2015-12-29 19:36:59 -05:00
Yaroslav Halchenko
16710237e3
Merge remote-tracking branch 'origin/master'
...
* origin/master:
Add 'Sender address rejected: Domain not found' Postfix failregex
2015-12-29 19:31:04 -05:00
sebres
134c33cc6d
fail2ban-testcases: added option "--ignore": negate [regexps] filter, to ignore tests matched specified regexps
2015-12-29 19:00:51 +01:00
sebres
8eca2ecd84
optimized version of "str2seconds" with pre-compiled regexp;
2015-12-29 19:00:49 +01:00
sebres
da51fbf9c6
code review and performance optimization:
...
- default date templates cache + regexp compiling on the fly (if required);
- better usage of shared config over all test cases;
- obsolete test cases removed (simple test of memleak/gc);
- skip some slow test cases in fast mode (setup test, etc.);
2015-12-29 12:49:53 +01:00
sebres
3f2b58e973
datedetector: matchTime, template list etc. rewritten because of performance degradation (without sorting templates now) - in-place reordering using hits and last used time;
...
todo: rewrite "reGroupDictStrptime" because may be too slow;
2015-12-29 12:49:51 +01:00
sebres
e065941ac5
use "maxEntries" (currently 50 as default) as range for max number of the last matches/failures, fail2ban will hold per IP in the list of failures in failmanager resp. in the database;
...
prevents out of memory situation if many IP's makes extremely many failures (or very large files since last fail2ban run);
closes gh-1277
todo: parameter `maxentries` should be configurable (jail.conf resp. fail2ban.conf);
todo: adjust ban-time-incr branch by merge (table "bips").
2015-12-29 12:49:48 +01:00
sebres
935d79eaae
1) prevents a bug by logging stdout/stderr if retcode still None:
...
```
in executeCmd
if retcode < 0:
TypeError: unorderable types: NoneType() < int()
```
2) prevents a rarely test case bug of testExecuteTimeoutWithNastyChildren, because no stdout (Resource temporarily unavailable), possible no flush by IO of the killing process;
2015-12-29 12:49:46 +01:00
sebres
6406f6f560
background servicing (temporally executed from failmanager): prevents memory leak on some platforms/python versions, using forced GC in periodic intervals (latency and threshold);
...
Side effect: GC is disabled now inside fail2ban-server (to avoid multiple garbage collect)
2015-12-29 12:49:44 +01:00
sebres
a10eb39bbe
test cases extended with memory leakage check
2015-12-29 12:49:41 +01:00
sebres
f7cc55103c
optimized FailManager: increase performance, try to prevent memory leakage (don't copy failures resp. it list on some operations)
2015-12-29 12:49:39 +01:00
sebres
f143ae479c
code and config review after rebase to current master
2015-12-29 12:49:37 +01:00
sebres
72f29e9061
asyncserver (asyncore) code fixed and test cases repaired (always delete temp files, wait for end of thread/server, etc)
...
definitely closes gh-161, also other usage of asyncore event loop (in test_smtp.py)
repair cache in ipToName (can returns None), precaching of invalid IPs (according to RFC 5737) to stop endless wait for resolving it in test cases.
2015-12-29 12:49:34 +01:00
sebres
770c219ab6
SetupTest should run at version of python currently installed (resp. active one), skip if started with another version.
2015-12-29 12:49:32 +01:00
sebres
cf3cf27fa3
- filtering of test cases extended for method additionally to class (matches method only not whole class for regexp matched method name);
...
- new options for "fail2ban-testcases" introduced: "-g" or "--no-gamin" and "-m" or "--memory-db", both are true also if "-f" or "--fast" specified,
for example: `fail2ban-testcases -ngm` will runs faster (because no network, no gamin, memory database)
but will use the same default sleep intervals as in production (in comparison to -nf);
- seekToTime rewritten, accuracy increased by seekToTime, extended for all FileFilter (PyInotify, Gamin also), test cases extended etc.
- common performance optimized and code reviewed;
2015-12-29 12:49:30 +01:00
sebres
6faffe3201
test cases extended, code review (+ python 3.x compatibility);
...
database test cases extended - enable deleted (disabled) jail in addJail;
2015-12-29 12:49:27 +01:00
Yaroslav Halchenko
0e61b7586a
RF: use descriptive loop variable (oldticket) and matching associated variable suffixes (old)
2015-12-29 12:49:26 +01:00
Yaroslav Halchenko
e2a68bb02d
RF: make Jail new style class, avoiding multiple inheritance with object
2015-12-29 12:49:24 +01:00
Yaroslav Halchenko
78eb4d95eb
RF: is_alive -> isAlive to stay consistent in camelCasing
2015-12-29 12:49:21 +01:00
sebres
59bf5013c0
- performance of fail2ban optimized
...
-- cache dnsToIp, ipToName to prevent long wait during retrieving of ip/name for wrong dns or lazy dns-system;
-- instead of simple "sleep" used conditional wait "wait_for", that internal increases sleep interval up to sleeptime;
-- ticket / banmanager / failmanager modules are performance optimized;
-- api of filter (log files), jail, etc. rewritten and extended for performance purposes;
- performance of test cases optimized:
-- added option "--fast" to decrease wait intervals, avoid passive waiting, and skip few very slow test cases;
- code review after partially cherry pick of branch 'ban-time-incr' (see gh-716)
-- ticket module prepared to easy merge with newest version of 'ban-time-incr', now additionally holds banTime, banCount and json-data;
-- executeCmd partially moved from action to new module utils, etc.
-- python 2.6 compatibility;
- testExecuteTimeoutWithNastyChildren: test case repaired - wait for pid file inside bash, kill tree in any case (gh-1155);
- testSocket: test case repaired - wait for server thread starts a socket (listener)
2015-12-29 12:49:19 +01:00
sebres
3540619a73
code review, test case extended;
2015-12-29 12:49:17 +01:00
sebres
d23d103f96
code review and few new test cases
2015-12-29 12:49:15 +01:00
sebres
db5ee0842a
increase code coverage
2015-12-29 12:49:13 +01:00
sebres
d22b2498d4
normalizing time config entries: use time abbreviation (str2seconds) for all time options such 'dbpurgeage', 'bantime', 'findtime', ex.: default '1d' instead '86400';
...
code review and test case extended;
2015-12-29 12:49:10 +01:00
sebres
dad4234beb
The tricky bug fixed - last position of log file will be never retrieved ( #795 ):
...
addJail (executed before addLog) early uses a "INSERT OR REPLACE" statement to update "enabled" to 1 (and add jail the first time used at once), but this syntax in sqlite always deletes an entry (cause of constraint) and inserts it again, so because of CASCADE all log entries with this jail will be also deleted from logs table.
2015-12-29 12:49:08 +01:00
sebres
410f9d7c10
filter, datedetector, datetemplate: performance optimizing of combination datedetector.matchTime/getTime2, because early getTime search a template and call template.matchTime again (so the date parsing was really executed twice, now just once);
...
debug logging optimized;
added info line log "Start Fail2ban ..." after changed logging target;
2015-12-29 12:49:06 +01:00
sebres
42199957d0
prevent completely read of big files first time (after start of service), initial seek to start time using half-interval search algorithm (see issue #795 ):
...
now polling backend only (currently not implemented for gamin and pyinotify backends);
python3/pypy compatibility fix + removing obsolete code
2015-12-29 12:48:15 +01:00
sebres
3cfdc5ecb3
test cases extended;
...
code review
2015-12-29 12:48:14 +01:00
sebres
a3e0cc9830
introduced string to seconds (str2seconds) for configuration entries with time;
...
todo: expands it for all time config entries;
2015-12-29 12:48:11 +01:00
Yaroslav Halchenko
26dd6d7425
Merge pull request #1258 from aleksandrs-ledovskis/feature/postfix-domain-not-found-failregex
...
Add 'Sender address rejected: Domain not found' Postfix failregex
2015-12-18 09:23:54 -05:00
Yaroslav Halchenko
dfaf82d68a
Changelog entry for PartOf in .service fix
2015-12-18 09:23:12 -05:00
Yaroslav Halchenko
9f15d02910
Merge pull request #1251 from fastest963/master
...
Added PartOf to service file so f2b restarts when deps do
2015-12-18 09:21:43 -05:00
Yaroslav Halchenko
edcbdf6eab
Merge pull request #1264 from rbrownwsws/master
...
Added filter and jail for murmur/mumble-server.
2015-12-18 09:20:45 -05:00
Yaroslav Halchenko
39d202b623
Merge pull request #1273 from yarikoptic/enh-log-matchtuple
...
ENH: log at heavydebug level what actually we are matching for failregex
2015-12-18 09:20:02 -05:00
Ross Brown
8d12dba245
Merge remote-tracking branch 'upstream/master'
2015-12-17 18:01:17 +00:00
Ross Brown
16aa2fa13e
Updated ChangeLog to include new murmur jail.
2015-12-17 17:57:45 +00:00
Ross Brown
ead2d509dc
Updated 'murmur' filter to use new double-anchored regex based on @yarikoptic's suggestions.
2015-12-17 17:45:24 +00:00
Yaroslav Halchenko
61b2653f9e
Merge pull request #1274 from yarikoptic/enh-new-sshd-too-many
...
ENH: sshd filter -- match new "maximum auth attempts exceeded"
2015-12-16 06:58:47 -05:00
Ross Brown
fd36b058ce
Changed usernames in sample log file for 'murmur' filter.
2015-12-15 21:55:07 +00:00
Ross Brown
ba535826a8
Updated ChangeLog to include new murmur filter.
2015-12-15 21:46:35 +00:00
Yaroslav Halchenko
5d6cead996
ENH: sshd filter -- match new "maximum auth attempts exceeded" ( Closes #1269 )
2015-12-13 23:21:04 -05:00
Yaroslav Halchenko
9ee08fed48
ENH: log at heavydebug level what actually we are matching for failregex
2015-12-13 23:06:02 -05:00
sebres
6d984717b5
ordered dict replaced with dict + change log entry fix
...
# Conflicts:
# fail2ban/server/filter.py
2015-12-12 15:48:49 +01:00
Yaroslav Halchenko
48202f998d
RF: prefer log over container in getLog and local variables
...
Even though I have left FileContainer class name intact
2015-12-02 22:57:40 -05:00
Yaroslav Halchenko
59da27b9f6
ENH: add a check to testTail to assure correct test logic below it
2015-12-02 22:53:28 -05:00
Yaroslav Halchenko
dd9d1912e8
RF: Filter.getLogPaths -> getLogs
...
Since it returns log containers not paths per se
2015-12-02 22:49:47 -05:00
sebres
6ce7522d3c
unordered (python 2.6) compatibility fix and coverage extended;
2015-12-02 21:29:27 +01:00
sebres
3a179ec5d7
small code review: (much pretty) handling of filename as key - FileFilter contains (ordered) dict of files (not list), as discussed in gh-1265
2015-12-02 20:45:01 +01:00
Ross Brown
4c837f0333
Added sample log file for 'murmur' filter.
2015-11-29 16:28:47 +00:00
Ross Brown
106c3eab9a
Added filter and jail for murmur/mumble-server.
2015-11-29 15:56:56 +00:00
Serg G. Brester
1b0560d2f1
Merge pull request #1262 from sarneaud/gentoo-initd
...
Small fixes for Gentoo initd script
2015-11-28 21:00:28 +01:00
sarneaud
5b88a84fe8
Small fixes for Gentoo initd script
...
These fixes are pretty pedantic, but they do simplify the script a
little.
* Checking the existence of a file/directory before creating/deleting
it adds complexity and raciness. There are better options.
* mkdir -p does the job of making sure a directory exists. (It only
fails if there's a filesystem error or something.)
* Likewise, rm -f doesn't fail if the file doesn't exist.
* rm -r isn't neccessary because the socket shouldn't be a directory.
(If it is for some reason, that should be an error.)
2015-11-28 15:03:09 +11:00
Aleksandrs Ļedovskis
fa59a6850f
Add 'Sender address rejected: Domain not found' Postfix failregex
...
Signed-off-by: Aleksandrs Ļedovskis <aleksandrs@ledovskis.lv >
2015-11-22 12:01:15 +02:00
Yaroslav Halchenko
fe8d585d91
Merge pull request #1225 from opoplawski/journaldefault
...
Add *_backend options for services to allow distros to set the default backend
2015-11-14 10:49:45 -05:00
Orion Poplawski
c656cb0d36
Merge branch 'master' into journaldefault
...
Conflicts:
ChangeLog
2015-11-13 15:22:59 -07:00
James Hartig
9905396eb8
Added PartOf to service file so f2b restarts when deps do
2015-11-11 23:10:35 -05:00
Yaroslav Halchenko
b3ed19b36a
DOC: tune up to jail.conf.5 - some line breaks, typos etc
2015-11-10 08:47:13 -05:00
Yaroslav Halchenko
6af6e40b62
Merge pull request #1241 from sebres/known/param-tag
...
New interpolation feature for definition config readers - `<known/parameter>`
2015-11-10 08:35:57 -05:00
Yaroslav Halchenko
441dffbe2a
ENH: Pruned some "pragma: no cover"s in fail2banregex
...
This code should and can be unit-tested, so no reason to keep it with
no cover
2015-11-10 08:31:56 -05:00
Yaroslav Halchenko
584f3af5af
Merge pull request #1240 from yarikoptic/master
...
ENH: .mailmap file to bring some names together for git shortlog -sn
2015-11-10 08:30:06 -05:00
Yaroslav Halchenko
aa0588dd1a
Merge pull request #1250 from sebres/_sb/fail2ban-regex-coverage
...
RF: fail2ban-regex code moved into client/ codebase, unittested
2015-11-10 08:28:56 -05:00
sebres
689dfa1e6a
debuggexURL fixed for wrong encoded character; test cases extended;
2015-11-10 13:29:54 +01:00
sebres
38f09b417a
fail2ban-regex command line (after fail2ban-regex functionality moved to the client)
2015-11-10 13:26:34 +01:00
sebres
0877d66228
fail2ban-regex moved to the client + test cases for initial coverage added
2015-11-10 11:46:19 +01:00
sebres
46b116e86a
filter test cases improved + log captured inside such tests + python 3.x compatibility;
...
changelog entry;
2015-11-09 22:02:05 +01:00
sebres
a42aa726ab
fixed fail2ban-regex reads invalid character (in sense of given encoding); continuing to process line ignoring invalid characters (still has no test cases).
...
filter test cases added for same issue inside fail2ban-server / fail2ban-testcases;
closes gh-1248
2015-11-09 20:47:15 +01:00
Yaroslav Halchenko
b100ee6302
Merge pull request #1244 from opoplawski/typo
...
Fix typo
2015-11-02 17:55:30 -05:00
Orion Poplawski
ba76f4ca2f
Fix typo
2015-11-02 15:21:14 -07:00
sebres
94cffece12
New interpolation feature for definition config readers - <known/parameter>, as extension to interpolation %(known/parameter)s, that does not works for filter and action init parameters;
2015-11-02 21:45:03 +01:00
Simon Brown
69bb532db0
removed system.log
2015-11-02 09:26:45 -08:00
Simon Brown
3e16f33dbe
Removed old svn revision comment
2015-11-02 09:08:47 -08:00
Simon Brown
d16ad80597
removed false matches
...
For non-screensharingd related messages
2015-11-02 09:06:32 -08:00
Yaroslav Halchenko
b40c6cbd9a
ENH: .mailmap file to bring some names together for git shortlog -sn
2015-11-01 11:28:58 -05:00
sebres
5767191988
fixed misleading documentation of banaction
2015-11-01 17:08:00 +01:00
sebres
fcf03790f4
fixed misleading documentation of banaction
2015-11-01 17:05:02 +01:00
Serg G. Brester
eef7771b4e
Merge pull request #1238 from sebres/fix/gh-1216
...
Fixed directly defined banaction for allports jails like pam-generic, recidive, etc
2015-10-31 13:17:04 +01:00
sebres
e825e977cc
Nginx log paths extended (prefixed with "*" wildcard)
...
closes gh-1237
2015-10-30 17:51:30 +01:00
sebres
f359ed8c36
Fixed directly defined banaction for allports jails like pam-generic, recidive, etc with new default variable banaction_allports (+ man entries for both variables added);
...
closes gh-1216
2015-10-30 15:36:18 +01:00
Simon Brown
5839a3bd80
Removed includes comment for screensharing jail
2015-10-29 16:07:54 -07:00
sebres
53b39162a1
Shortly, much faster and stable version of regexp (possible because expression is start-anchored and does not contains closely to catch-all sub expressions)
2015-10-29 23:55:23 +01:00
sebres
6884593ab8
New filter nginx-limit-req ban hosts, that were failed through nginx by limit request processing rate (ngx_http_limit_req_module)
2015-10-29 23:15:20 +01:00
Orion Poplawski
0661aece46
Merge branch 'master' into journaldefault
...
Conflicts:
ChangeLog
2015-10-29 15:22:37 -06:00
Simon Brown
65bc5cf6ba
Now using a literal logpath for screensharing jail
2015-10-29 09:03:01 -07:00
Simon Brown
cabd46f069
Fixed blatant typo in regex
...
However, still failing test, even though ```PYTHONPATH=. fail2ban-regex -v fail2ban/tests/files/logs/screensharingd /etc/fail2ban/filter.d/screensharingd.conf``` gives desired result
2015-10-28 20:58:25 -07:00
Simon Brown
bed28eaa62
clarified comments on sample log format
2015-10-28 15:32:58 -07:00
Simon Brown
c936d19805
Fixed name (again?)
2015-10-28 15:30:31 -07:00
Simon Brown
acee68a9ee
Made screensharing jail off by default
...
Also added note about requiring paths-osx.conf.
2015-10-28 15:11:11 -07:00
Simon Brown
4b4d5a95b7
Changed regex prequel
...
Use standard prefix macro instead of literal daemon name.
2015-10-27 21:30:20 -07:00
Simon Brown
3dd1c305ce
added entry for new screensharingd filter
2015-10-27 21:20:12 -07:00
Simon Brown
6a5f10ee72
name change & new sample data
...
changed name to match daemon, log samples with year
2015-10-27 16:27:14 -07:00
Simon Brown
3e4a77a568
Added json metadata
2015-10-27 12:31:51 -07:00
Simon Brown
b3a18631e2
Sample log for test case
2015-10-27 10:43:43 -07:00
Simon Brown
4c3f778b82
Replaced .* with literal
...
Per Serg's suggestions. Possible I'm missing some auth attempt types, but I couldn't find anything where literal wasn't sufficient.
2015-10-27 10:33:30 -07:00
Simon Brown
d17d837b8c
Update jail.conf
...
Added logencoding to screensharing jail to avoid encoding error messages in fail2ban log
2015-10-27 10:28:07 -07:00
Simon Brown
de14946542
Added new path variable for system.log
...
Logging location for the majority of Mac OS daemons.
2015-10-26 18:02:07 -07:00
Simon Brown
80546c6164
Added in settings for screensharingd filter
2015-10-26 17:50:49 -07:00
Simon Brown
3ec725a2ba
Created file
...
From https://github.com/beezwax/filemaker-fail2ban/blob/master/fail2ban/filter.d/screensharingd.conf
2015-10-26 17:35:38 -07:00
sebres
eb87638ead
ChangeLog entry for OpenHAB home automation filter (gh-1223)
2015-10-26 15:56:01 +01:00
1technophile
2861a957a9
filter for openhab domotic software authentication failure with the rest api and web interface + test cases;
...
closes gh-1223
2015-10-26 15:48:23 +01:00
Serg G. Brester
26517b0464
Merge pull request #1226 from pablorf-dev/master
...
Minor fix and enhancement (fake google domains)
2015-10-22 14:23:47 +02:00
Pablo Rodriguez Fernandez
2c576c64f8
Change domain filter regex
...
Change domain filter regex since there are other Google crawlers.
See "Google crawlers"
<https://support.google.com/webmasters/answer/1061943?hl=en >
2015-10-20 10:46:00 +02:00
Pablo Rodriguez Fernandez
74fcb219ab
Enhanced Google domain detection in apache-fakegooglebot
...
Previously, an attacker could fake a domain like
crawl-1-1-1-1.googlebot.com.fake.net and get resolved. This change
avoids to resolve fake Google domains.
2015-10-20 10:45:53 +02:00
Orion Poplawski
3a9cf2b3da
Add and use default_backend to set individual backend defaults to auto
2015-10-19 19:50:03 -06:00
Orion Poplawski
81a26266a9
Add changlog entry for postfix-rbl logpath change
2015-10-19 19:46:43 -06:00
Orion Poplawski
ced7be94b2
Fix postfix_log typo
2015-10-19 19:43:10 -06:00
Orion Poplawski
75d33c0f09
Add *_backend options for services to allow distros to set the default backend
...
per service.
Set default to systemd for Fedora as appropriate.
2015-10-18 20:18:50 -06:00
Pablo
7e6964dd9d
Fix section jail.conf.5 manpage
...
The section of jail.conf manpage is wrong, should be 5, not 10
2015-10-15 10:40:56 +02:00
Serg G. Brester
3a5d4fdd26
Merge pull request #1221 from pablorf-dev/master
...
Add check in apache-fakegooglebot to protect against PTR fake record (gh-1221)
2015-10-14 11:33:06 +02:00
Pablo Rodriguez Fernandez
a28e6b442e
Add check in apache-fakegooglebot to protect against PTR fake record
...
An attacker may return a PTR record which fakes a Googlebot's domain
name. This modification resolves the PTR records to verify it.
See "Verifying Googlebot":
<https://support.google.com/webmasters/answer/80553?vid=1-635800030504666679-1963774919 >
2015-10-13 17:11:49 +02:00
Yaroslav Halchenko
16443f7b05
Merge pull request #1219 from agentmoller001/patch-1
...
Updated route.conf to clear warnings (Closes #1026 )
2015-10-09 21:26:53 -04:00
agentmoller001
617302fcc2
Updated route.conf to clear warnings
...
Does not throw warnings when starting/restarting by adding three lines of code.
2015-10-09 18:16:36 -07:00
Yaroslav Halchenko
6fb5e3a494
removed outdated and "problematic" .pydevproject
2015-10-09 14:10:02 -04:00
Serg G. Brester
42598fbf26
Merge pull request #1215 from paulmenzel/strip-trailing-whitespace-from-files-under-files
...
files: Strip trailing whitespace from files
2015-10-08 18:39:40 +02:00
Paul Menzel
078e2048f2
files: Strip trailing whitespace from files
...
Run the command `StripWhitespace` from the [Vim Better Whitespace
Plugin](https://github.com/ntpeters/vim-better-whitespace ).
2015-10-08 16:18:08 +02:00
sebres
2696ede251
mysqld-auth: Updated "Access denied ..." regex for MySQL 5.6 and later
...
closes gh-1211
2015-10-07 14:34:13 +02:00
sebres
61ac481703
IpToName test case fixed ('66.249.66.1' resp. 'crawl-66-249-66-1.googlebot.com' seems to be unresolvable)
2015-10-07 13:36:21 +02:00
Serg G. Brester
68db52474d
Merge pull request #1206 from kevinoid/ssh-match-auth-fail
...
ssh.conf: Fix disconnect "Auth fail" matching
2015-10-05 10:15:53 +02:00
Kevin Locke
2a5c93cfb5
Update ChangeLog and THANKS for "Auth fail" changes
...
Document the changes from 36919d9f in the ChangeLog and add myself to
the THANKS file (at @sebres suggestion).
Signed-off-by: Kevin Locke <kevin@kevinlocke.name >
2015-10-05 00:31:13 -07:00
Kevin Locke
42b0e9258d
Test cases for ssh.conf disconnect "Auth fail"
...
Add test coverage for the new disconnect "Auth fail" matching added in
36919d9f .
Signed-off-by: Kevin Locke <kevin@kevinlocke.name >
2015-10-02 15:56:26 -07:00
Kevin Locke
36919d9f97
ssh.conf: Fix disconnect "Auth fail" matching
...
The regex for matching against "Auth fail" disconnect log message does
not match against current versions of ssh. OpenSSH 5.9 introduced
privilege separation of the pre-auth process, which included
[logging through monitor.c](http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/monitor.c.diff?r1=1.113&r2=1.114 )
which adds " [preauth]" to the end of each message and causes the log
level to be prepended to each message.
It also fails to match against clients which send a disconnect message
with a description that is either empty or includes a space, since this
is the content in the log message after the disconnect code, per
[packet.c:1785](http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/packet.c?annotate=1.215 ),
which was matched by \S+. Although I have not observed this yet, I
couldn't find anything which would preclude it in [RFC
4253](https://tools.ietf.org/html/rfc4253#section-11.1 ) and since the
message is attacker-controlled it provides a way to avoid getting
banned.
This commit fixes both issues.
Signed-off-by: Kevin Locke <kevin@kevinlocke.name >
2015-10-02 15:46:29 -07:00
Yaroslav Halchenko
8311bad4ea
Merge pull request #1204 from szepeviktor/patch-8
...
Added CloudFlare API error codes URL
2015-09-30 07:54:30 -07:00
Viktor Szépe
0d8968daa9
Added CloudFlare API error codes URL
2015-09-30 16:07:45 +02:00
Yaroslav Halchenko
7f3b31aa37
Merge pull request #1198 from yarikoptic/enh-split-comma
...
ENH: allow to split ignoreip by space and/or comma (Closes #1197 )
2015-09-27 11:09:55 -04:00
Yaroslav Halchenko
ff06176e9e
Merge remote-tracking branch 'origin/master' into enh-split-comma
...
* origin/master:
DOC: changelog for the timeout change
Set Timeout at urlopen to 3 seconds
README :: init/service example mentions debian based systems as the example
README :: fitted paragraph style
BF: disable testing on python 3.2 until coverage gets a fix
README :: Some style/grammar tweaks, and init/service script mention. Re: #1193
Set Timeout at urlopen to 3 seconds
2015-09-27 00:52:14 -04:00
Yaroslav Halchenko
4c48e994eb
Merge pull request #1201 from yoosefi/master
...
README :: Some style/grammar tweaks, and init/service script mention.…
2015-09-27 00:51:16 -04:00
Yaroslav Halchenko
6c0f898ec7
DOC: changelog for the timeout change
2015-09-27 00:49:57 -04:00
Yaroslav Halchenko
166e99d2ba
Merge pull request #1203 from maxbeth/master
...
Add a timeout (3 sec) to urlopen within badips.py action
2015-09-27 00:48:50 -04:00
M. Maraun
ebfd223320
Merge branch 'master' of github.com:maxbeth/fail2ban
2015-09-26 21:30:04 +02:00
M. Maraun
2895d981fa
Set Timeout at urlopen to 3 seconds
2015-09-26 21:26:55 +02:00
Ryan Yoosefi
0610791ffe
README :: init/service example mentions debian based systems as the example
2015-09-25 02:25:11 -07:00
Ryan Yoosefi
c1b80a5e1b
README :: fitted paragraph style
2015-09-25 02:23:08 -07:00
Yaroslav Halchenko
d618ee3d90
BF: disable testing on python 3.2 until coverage gets a fix
2015-09-24 09:53:55 -04:00
Ryan Yoosefi
4744e16539
README :: Some style/grammar tweaks, and init/service script mention. Re: #1193
2015-09-24 06:37:01 -07:00
Yaroslav Halchenko
8cf614e221
ENH: allow to split ignoreip by space and/or comma ( Closes #1197 )
...
Way too many people ran into this gotcha, so lets just do it
2015-09-23 12:13:52 -04:00
Yaroslav Halchenko
24f875ad3e
Merge pull request #1196 from yarikoptic/bf-longer-margin
...
BF: relax 1 sec delay testing to 100ms margin (Closes #1195 )
2015-09-23 09:58:41 -04:00
Yaroslav Halchenko
84afcd8b1f
BF(PY26): no assertGreater in 2.6 -- use explicit comparison
2015-09-23 09:45:51 -04:00
Yaroslav Halchenko
17a4289798
BF: relax 1 sec delay testing to 100ms margin ( Closes #1195 )
2015-09-23 08:38:51 -04:00
Yaroslav Halchenko
55e542b273
Merge remote-tracking branch 'pr/1170/head' -- opensuse paths
...
* pr/1170/head:
Updated ChangeLog regarding openSUSE's path config
Added configuration for opensuse path
2015-09-17 21:59:45 -04:00
Yaroslav Halchenko
82e528d1dd
Merge pull request #1191 from yarikoptic/enh-year-after-day
...
ENH: new date pattern with year after day (not after entire entry)
2015-09-17 21:50:46 -04:00
Yaroslav Halchenko
db1a3f17e1
ENH: new date pattern with year after day (not after entire entry)
2015-09-16 08:56:46 -04:00
Yaroslav Halchenko
41edfe8caf
Merge pull request #1188 from yarikoptic/rf-assertLogged
...
RF(TST): self.assertTrue(self._is_logged()) -> self.assertLogged
2015-09-15 09:14:58 -04:00
Yaroslav Halchenko
d0e6644acd
Merge branch 'rf-assertLogged'
...
* rf-assertLogged:
RF/BF: py26 has no {} sets, so just pass multiple entries as *args
RF(TST): self.assertTrue(self._is_logged()) -> self.assertLogged
2015-09-15 08:58:15 -04:00
Yaroslav Halchenko
d60c52b84f
Merge pull request #1187 from yarikoptic/bf-nasty-children-tests
...
BF+RF: executeCmd should only return bool status on success and not throw exceptions (when timedout/killed) (Closes #1155 )
2015-09-15 08:56:59 -04:00
Yaroslav Halchenko
fbdd0b74a1
DOC: Changelog entry for this fix
2015-09-13 10:45:39 -04:00
Yaroslav Halchenko
c2c4c40805
Merge remote-tracking branch 'origin/master' into bf-nasty-children-tests
...
* origin/master:
Comment spelling fixes
logrotate: Do not rotate empty logs
logrotate: Remove outdated Fedora comment
Updated Changelog
Bugfix for dnsToIp resolver for fqdn with large list of IPs; closes #1164
Added apache-badbots.conf
Update gen_badbots
Update apache-badbots.conf
changelog for freshly merged PR (roundcube-auth definition of logpath)
Fixed line suspected to be faulty
renamed <NAME> to correct <ACT> in protocol
Conflicts:
fail2ban/tests/actiontestcase.py -- due to comments fix up
2015-09-13 10:42:51 -04:00
Yaroslav Halchenko
bfa286b8e4
Merge pull request #1189 from scop/logrotate
...
Logrotate tweaks
2015-09-13 10:36:20 -04:00
Yaroslav Halchenko
cafc77d7db
Merge pull request #1190 from scop/spelling
...
Comment spelling fixes
2015-09-13 10:33:41 -04:00
Ville Skyttä
943efdb1a0
Comment spelling fixes
2015-09-13 11:08:04 +03:00
Ville Skyttä
67a94733a9
logrotate: Do not rotate empty logs
...
As a useful side effect, prevents "Unable to contact server. Is it
running?" mails from cron when fail2ban hasn't been (intentionally)
running nor thus logging anything either.
2015-09-13 11:05:33 +03:00
Ville Skyttä
63c7ceb81d
logrotate: Remove outdated Fedora comment
2015-09-13 10:57:51 +03:00
Yaroslav Halchenko
8a4dcafc8f
RF/BF: py26 has no {} sets, so just pass multiple entries as *args
2015-09-12 21:37:40 -04:00
Yaroslav Halchenko
5ed731d3b3
RF(TST): self.assertTrue(self._is_logged()) -> self.assertLogged
...
and corresponding one for not + support for multiple entries at once,
and failure message listing actual log to ease troubleshooting
2015-09-12 19:59:55 -04:00
Yaroslav Halchenko
7cbb3980eb
BF+RF: only return bool status on failed commands execution + mitigate different exit codes between bash/dash
...
Closes #1155
2015-09-12 19:39:44 -04:00
Yaroslav Halchenko
85b298e49c
RF: try/except/finally in a single statement (while at it)
...
since we support now python >= 2.6
2015-09-12 12:59:37 -04:00
Yaroslav Halchenko
5b655639ab
Merge pull request #1186 from EdwardBeckett/master
...
Updated Changelog
2015-09-11 11:43:58 -04:00
Edward Beckett
f5b88bd377
Updated Changelog
2015-09-11 10:12:57 -04:00
Yaroslav Halchenko
4a53629004
Merge pull request #1184 from fail2ban/gh-1164-fix
...
Bugfix for dnsToIp resolver for fqdn with large list of IPs;
2015-09-09 18:07:26 -04:00
sebres
4cf3b576b9
Bugfix for dnsToIp resolver for fqdn with large list of IPs;
...
closes #1164
2015-09-08 18:20:48 +02:00
Yaroslav Halchenko
818be64ae1
Merge pull request #1180 from EdwardBeckett/master
...
Update apache-badbots.conf
2015-09-06 09:46:47 -04:00
Edward Beckett
4bd7991573
Added apache-badbots.conf
2015-09-06 01:12:19 -04:00
Edward Beckett
03460d5ed0
Update gen_badbots
...
Added plus char to the regex for escaping user-agent strings.
2015-09-06 01:05:52 -04:00
Edward Beckett
835b3ff483
Update apache-badbots.conf
...
Useragent strings including `+http` need to be escaped to be valid.
2015-09-05 00:12:28 -04:00
weberho
2d69fd20ae
Updated ChangeLog regarding openSUSE's path config
2015-08-26 15:37:14 +02:00
weberho
f7af93a677
Added configuration for opensuse path
2015-08-26 15:25:59 +02:00
Yaroslav Halchenko
60fbf7d750
changelog for freshly merged PR (roundcube-auth definition of logpath)
2015-08-26 09:03:23 -04:00
Yaroslav Halchenko
db9ab7ffd0
Merge pull request #1169 from weberhofer/master
...
Fixed line suspected to be faulty
2015-08-26 09:02:13 -04:00
weberho
d278fbca30
Fixed line suspected to be faulty
2015-08-26 14:48:55 +02:00
Yaroslav Halchenko
1b6800c889
Merge pull request #1147 from pheanex/rename-name-act
...
renamed <NAME> to correct <ACT> in protocol
2015-08-02 10:19:05 -04:00
Konstantin Manna
7de78f4bb8
renamed <NAME> to correct <ACT> in protocol
2015-08-02 14:55:38 +02:00
Yaroslav Halchenko
9ebf01293b
Post release tune ups
2015-08-01 09:17:31 -04:00
Yaroslav Halchenko
70ba5cb005
Release changes (too much of manual "labor"! ;))
2015-07-31 21:32:13 -04:00
Yaroslav Halchenko
84ad3525e6
Merge pull request #1144 from yarikoptic/bf-realpath-var-run-1142
...
BF: realpath for /var/run/fail2ban Closes #1142
2015-07-31 15:50:46 -04:00
Yaroslav Halchenko
776322cea3
BF: realpath for /var/run/fail2ban Closes #1142
2015-07-31 10:12:14 -04:00
Yaroslav Halchenko
c37009aec7
Merge branch 'grep-m1k' of github.com:szepeviktor/fail2ban
...
* 'grep-m1k' of github.com:szepeviktor/fail2ban:
Limit the number of log lines in *-lines.conf actions
Conflicts:
ChangeLog -- took both versions and adjusted the new one
for -n 1000 change
2015-07-27 22:37:46 -04:00
Yaroslav Halchenko
a80820e356
Changelog entry for killpg fix
2015-07-27 22:34:40 -04:00
Yaroslav Halchenko
38c320798d
Merge pull request #1127 from yarikoptic/enh-iptables-w-close-1122
...
WIP ENH Add <lockingopt> (Close : #1122 ) and <iptables> to define the iptables call
2015-07-27 22:30:54 -04:00
Yaroslav Halchenko
cb101e9f4a
Merge pull request #1136 from yarikoptic/bf-timeout-nested-commands-killpg
...
WiP BF: kill the entire process group upon timeout (Close #1129 )
2015-07-27 22:30:09 -04:00
Yaroslav Halchenko
de69855157
Changelog entries for Serge's fixes
2015-07-27 10:35:14 -04:00
sebres
8a37a46fbb
bug fix: option 'dbpurgeage' was never set (always default) by start of fail2ban, because of invalid sorting of options ('dbfile' should be always set before other database options) / closes #1048 , closes #1050
2015-07-27 10:59:14 +02:00
Yaroslav Halchenko
17472a8b56
BF: guarantee order of dbfile to be before dbpurgeage ( Closes #1048 )
2015-07-27 10:18:29 +02:00
Yaroslav Halchenko
0041bc3770
DOC: Changelog for shorewall-ipset-proto6.conf + adjusted its description
2015-07-26 23:10:08 -04:00
Yaroslav Halchenko
de2f9504c0
Merge pull request #978 from ediazrod/patch-2
...
shorewall-ipset-proto6.conf for shorewall
2015-07-26 23:00:58 -04:00
Yaroslav Halchenko
65cd218e10
Merge remote-tracking branch 'origin/master'
...
* origin/master:
ipjailmatches is on one line with its description in man jail.conf
Added a space between IP address and the following colon
2015-07-26 22:47:43 -04:00
Yaroslav Halchenko
333dd842f9
DOC: moved and adjusted changelog entry from 0.9.2 within 0.9.3 to come
2015-07-26 22:44:52 -04:00
Yaroslav Halchenko
b566f992a6
Merge pull request #1128 from szepeviktor/text-selection
...
Added a space between IP address and the following colon
2015-07-26 22:13:29 -04:00
Yaroslav Halchenko
515ad6dc12
TST: test to verify killing stuck children processes
2015-07-26 21:52:38 -04:00
Yaroslav Halchenko
7112e4f6c6
BF: kill the entire process group upon timeout ( Close #1129 )
...
Requires also establishing a new process group for a child
process, which changes previous behavior
2015-07-26 20:41:43 -04:00
Viktor Szépe
c8b3ee10a0
Limit the number of log lines in *-lines.conf actions
2015-07-27 02:35:21 +02:00
Yaroslav Halchenko
6577387b5a
Merge pull request #1133 from szepeviktor/patch-7
...
ipjailmatches is on one line with its description in man jail.conf
2015-07-26 19:40:37 -04:00
Viktor Szépe
9547812526
ipjailmatches is on one line with its description in man jail.conf
2015-07-27 01:05:05 +02:00
Yaroslav Halchenko
33b204a2ee
DOC: Changelog for iptables -w change
2015-07-26 18:25:42 -04:00
Thomas Mayer
a19cb1b2b9
Merge 923d807ef8 into cf2feea987
2015-07-25 01:23:39 +00:00
Yaroslav Halchenko
cf2feea987
Merge pull request #1131 from leeclemens/patch-3
...
Remove self.printlog() call
2015-07-24 15:29:43 -04:00
Lee Clemens
8822ed4144
Remove self.printlog() call
...
This seems to have been used for debugging, while unittest method was disabled
2015-07-24 15:13:37 -04:00
Yaroslav Halchenko
fe8cc3e83d
Merge pull request #1130 from leeclemens/patch-2
...
Remove literal "TODO" from method's name
2015-07-24 14:22:27 -04:00
Lee Clemens
0ed1cb0aa6
Remove literal "TODO" from method's name
...
Also need to change expected log message, since this test hasn't been executed, possibly ever.
2015-07-24 13:57:59 -04:00
Yaroslav Halchenko
3c0d7f5a4c
BF: do not wrap iptables into itself. Thanks Lee
2015-07-24 11:59:53 -04:00
Viktor Szépe
ebdfbae559
Added a space between IP address and the following colon
2015-07-24 09:33:47 +02:00
Yaroslav Halchenko
749d3c160c
BF: symbiosis-blacklist-allports now also requires iptables-common.conf
2015-07-23 21:53:37 -04:00
Yaroslav Halchenko
916937bb6a
RF: use <iptables> to take effect of it being a parameter
2015-07-23 21:38:10 -04:00
Yaroslav Halchenko
31dc4e2263
ENH: added lockingopt option for iptables actions, made iptables cmd itself a parameter
2015-07-23 21:34:20 -04:00
Yaroslav Halchenko
7a011fca1b
DOC: adjusted comment in pass2allow-ftp to my suggested wording
2015-07-16 21:55:20 -04:00
Yaroslav Halchenko
80946ed54c
Merge pull request #1112 from szepeviktor/pass2allow
...
Added pass2allow (knocking with fail2ban)
2015-07-16 21:54:10 -04:00
Viktor Szépe
948b12e5df
Fixed definition of knocking_url for pass2allow
2015-07-14 18:35:51 +02:00
Viktor Szépe
b638e807ad
Explicitly stating that knocking_url needs to be customized
2015-07-13 18:12:04 +02:00
Viktor Szépe
586703dcc2
Test, changelog and fixes to pass2allow
2015-07-13 16:46:04 +02:00
Viktor Szépe
5b7e1de2f4
Instead of allow-iptables-multiport actions swap blocktype and (new) returntype
2015-07-11 18:20:09 +02:00
Viktor Szépe
5d60700c0c
Added pass2allow (knocking with fail2ban)
2015-07-10 16:22:43 +02:00
sebres
95c2a2976f
unbanip always deletes ip from database (independent of bantime, also if currently not banned or persistent);
...
merged from #716 where it works;
closes gh-972, closes gh-768
2015-07-10 13:56:26 +02:00
Yaroslav Halchenko
00d8779f87
Merge pull request #1104 from leeclemens/travis-rework
...
Improve Travis setup and coverage reporting (all versions report)
2015-07-09 19:39:20 -04:00
Lee Clemens
7f68516c5c
Re-add shebang to setup.py
2015-07-09 16:48:01 -04:00
Yaroslav Halchenko
76f288fd8a
Merge pull request #1108 from leeclemens/version_string
...
Append 0 to .dev version "number"
2015-07-09 15:26:16 -04:00
Lee Clemens
2c05e8d21d
Prevent UserWarning: The version specified requires normalization, add 0 to version
2015-07-09 14:31:51 -04:00
Lee Clemens
c56785685b
Set VENV path and use pip to install
2015-07-09 11:23:50 -04:00
Lee Clemens
fc2b7f8012
Multiple Travis and coverage related changes
...
Reorganize .travis.yml
Separate coverage tests for Python 2 and Python 3
Execute setup.py install using the environment's Python exe
Sanitize Travis execution order
2015-07-09 10:12:40 -04:00
Lee Clemens
675767ad4f
Exclude coverage traceback in smoke test (misctestcase)
2015-07-09 10:12:40 -04:00
Lee Clemens
94bc77aac8
Consolidate coveragerc configs into .coveragerc (delete .travis_coveragerc)
2015-07-09 10:12:40 -04:00
Lee Clemens
f50dcf7658
Remove shebang from setup.py
2015-07-09 10:12:40 -04:00
Lee Clemens
b1022a4fe4
DOC: Use coverage report and optionally coverage html
2015-07-09 10:12:40 -04:00
sebres
4aff396b05
deserialize "close" message not expected (was not serialized).
...
closes #1103
2015-07-08 11:10:05 +02:00
Lee Clemens
1ebea39ec5
Merge pull request #1068 from yarikoptic/enh/var-run-fail2ban
...
BF: 'create' /var/run/fail2ban on systems with /var/run
2015-07-07 21:55:49 -04:00
M. Maraun
d412b71f3a
Merge branch 'master' of github.com:maxbeth/fail2ban
2015-07-07 21:58:51 +02:00
Yaroslav Halchenko
c213d97d25
Moved recently added Changelog (on HEAD addition) to Enhancements
2015-07-07 14:01:24 -04:00
Yaroslav Halchenko
e2c0a1060e
Merge pull request #1101 from szepeviktor/patch-6
...
HEAD is a popular break-in attempt type
2015-07-07 13:49:31 -04:00
Viktor Szépe
a3b8257b73
Add HEAD method verb to apache-badbots, nginx-badbots
2015-07-07 17:45:40 +02:00
Lee Clemens
57a8b99509
DOC: Fix typo
2015-07-07 11:44:27 -04:00
Yaroslav Halchenko
052418a110
Merge pull request #1098 from yarikoptic/enh/man-testcases
...
DOC: rudimentary manpage for fail2ban-testcases (+updated other mans for consistency)
2015-07-06 23:43:30 -04:00
Serg G. Brester
cbb846bb46
Merge pull request #1099 from fail2ban/_sebres/min-connect-overhead
...
performance fix: minimizes connection overhead (close only at communication end)
2015-07-06 22:49:00 +02:00
sebres
4a4fe7d76a
extending test cases (increase coverage) + changelog entry for #1099
2015-07-06 22:09:13 +02:00
sebres
3e47ce7f2a
redefine protocol constants in protocol.py (prevent unnecessary duplication)
2015-07-06 17:37:12 +02:00
sebres
17502bd818
obsolete code removed (python <= 2.5) + test case extended
2015-07-06 13:08:13 +02:00
sebres
81e659b760
performance fix: minimizes connection overhead, using same socket by multiple commands without close it (ex.: 'start' sends several hundreds commands at once)
2015-07-06 12:23:53 +02:00
Yaroslav Halchenko
46510948a7
DOC: rudimentary manpage for fail2ban-testcases (+updated other mans for consistency)
2015-07-05 21:48:14 -04:00
Yaroslav Halchenko
38f8e1a82a
DOC: added changelog for LC_ALL fix, tuned up other ChangeLog entries
2015-07-05 21:39:17 -04:00
Yaroslav Halchenko
8c4c17a880
Merge pull request #1004 from tsabi/fix-lc_time
...
Fix of LC_TIME usage, it should be LC_ALL
2015-07-05 21:36:37 -04:00
Yaroslav Halchenko
e38b4b8cb3
Merge pull request #1051 from leeclemens/bf/roundcube
...
Update regex to work with roundcube 1.0.5 and 1.1.1
2015-07-05 21:35:49 -04:00
Yaroslav Halchenko
c0feebfad8
Merge pull request #1088 from leeclemens/bf-595/nonrootmessage
...
Add specific errors for client socket access (closes 595)
2015-07-05 21:33:56 -04:00
Yaroslav Halchenko
e5a5edd35b
Merge pull request #1096 from leeclemens/bf/log-args
...
Fix error logging - not enough arguments (tuple is 1 arg, need 2)
2015-07-05 21:31:14 -04:00
Lee Clemens
b5d5a79845
Fix error logging - not enough arguments (tuple is 1 arg, need 2)
2015-07-05 10:30:45 -04:00
Yaroslav Halchenko
034a865c79
Merge pull request #1093 from leeclemens/pep8-e7
...
Fix PEP8 E701, E703 and E712
2015-07-05 00:05:48 -04:00
Yaroslav Halchenko
7fc93cee37
Merge pull request #1094 from leeclemens/pep8-e3
...
Fix PEP8 E301, E302 and E303
2015-07-05 00:03:19 -04:00
Lee Clemens
fd46b90106
Merge pull request #1095 from leeclemens/bf-1089/disable-pypy
...
temporarily disabled pypy in .travis.yml
2015-07-04 17:35:09 -04:00
Lee Clemens
6a711503fe
temporarily disabled pypy in .travis.yml
2015-07-04 17:24:59 -04:00
Lee Clemens
3e902d7b3a
Define roundcube_errors_log in paths-common.conf
...
Remove from paths-debian
2015-07-04 14:46:31 -04:00
Lee Clemens
fdc3172aec
Fix PEP8 E302 expected 2 blank lines, found X
2015-07-04 13:47:40 -04:00
Lee Clemens
fbeee8bb28
Fix PEP8 E303 too many blank lines
2015-07-04 13:25:20 -04:00
Lee Clemens
60c5c6951c
Fix PEP8 E301 expected 1 blank line, found 0
2015-07-04 13:23:08 -04:00
Lee Clemens
31b34950f7
Fix pep8 E712 comparison to False should be 'if cond is False:' or 'if not cond:'
2015-07-04 12:39:42 -04:00
Lee Clemens
fe5e7a023e
Fix pep8 E701 multiple statements on one line (colon)
2015-07-04 12:39:42 -04:00
Lee Clemens
1a98e15328
Fix pep8 E703 statement ends with a semicolon
2015-07-04 12:39:42 -04:00
Lee Clemens
423d5b761e
Add changelog reference for socket error logging message
2015-07-04 12:37:52 -04:00
Lee Clemens
77f5983b42
Test permissions to socket for detailed errors if socket.error raised
2015-07-04 12:35:56 -04:00
Lee Clemens
f7444f16b8
Add optional session id prefix for roundcube 1.1.1
2015-07-04 11:06:51 -04:00
Lee Clemens
2796534a5d
Update regex to work with roundcube 1.0.5 on CentOS 6
2015-07-04 11:02:04 -04:00
Yaroslav Halchenko
e9e00d7599
DOC: ChangeLog -- a better description for cloudflare changes
2015-07-04 10:04:45 -04:00
Yaroslav Halchenko
454546f4ae
Merge pull request #1085 from szepeviktor/patch-5
...
Updated CF action - added docs and composite action to jails.conf
2015-07-04 09:33:33 -04:00
Viktor Szépe
a00ee15c06
Added Changelog entry
2015-07-04 14:12:38 +02:00
Yaroslav Halchenko
81db2f47dc
Merge pull request #1090 from leeclemens/pep8-e401-bin
...
Fix PEP8 E401 - multiple imports on one line
2015-07-03 20:37:29 -04:00
M. Maraun
6d72602f6b
Set Timeout at urlopen to 3 seconds
2015-07-03 22:42:22 +02:00
Viktor Szépe
b65a8b065d
Other actions do not dive into this gory descriptions, but we do.
2015-07-03 19:17:50 +02:00
Lee Clemens
c7e203b20f
Fix PEP8 E401 - multiple imports on one line
2015-07-03 13:02:50 -04:00
Yaroslav Halchenko
cf3a1c15a0
Merge pull request #1082 from leeclemens/pep8-w6
...
Fix pep8 w6 - Deprecation warnings
2015-07-03 12:32:13 -04:00
Viktor Szépe
2063ce4b23
All the arguments must be listed in [Init]
2015-07-01 14:48:44 +02:00
Viktor Szépe
79457112e9
Updated CF action
2015-07-01 09:38:36 +02:00
Lee Clemens
8e0145b947
Fix pep8 W604 "backticks are deprecated, use 'repr()'"
2015-06-27 13:57:09 -04:00
Lee Clemens
2310ac44c7
Fix pep8 W602 "deprecated form of raising exception"
2015-06-27 13:57:09 -04:00
Lee Clemens
3e3d1e0cf6
Fix pep8 W601 ".has_key() is deprecated, use 'in'"
2015-06-27 13:57:09 -04:00
Lee Clemens
f899340b15
Merge pull request #1083 from leeclemens/pep8-e4
...
Fix pep8 E401 multiple imports on one line
2015-06-27 11:11:35 -04:00
Lee Clemens
7667712909
Fix pep8 E401 multiple imports on one line
2015-06-26 12:51:19 -04:00
sebres
f2d0230a67
reload in interactive mode appends all the jails twice ( #825 )
2015-06-22 17:57:01 +02:00
sebres
2f283079f8
reload server/jail failed if database used (but was not changed) and some jail active ( #1072 )
2015-06-22 17:56:39 +02:00
Yaroslav Halchenko
2d9ece2d04
BF: 'create' /var/run/fail2ban on systems with /var/run
...
Should overcome problems of some users installing using setup.py install
2015-06-11 19:43:42 -10:00
Yaroslav Halchenko
345820d2aa
Merge pull request #1056 from ipoddubny/asterisk_security_log
...
Fix support for Asterisk security log
2015-05-25 12:50:13 -04:00
Yaroslav Halchenko
f41872f034
Merge pull request #1013 from szepeviktor/patch-4
...
Non-US locale warning for proftpd
2015-05-25 10:51:51 -04:00
Yaroslav Halchenko
eb091d9b8c
Merge remote-tracking branch 'origin/master' into pr-1039
...
* origin/master:
minor: no tripple empty lines
add froxlor-auth filter and jail
add froxlor-auth filter and jail 0
add froxlor-auth filter and jail
BF: Fix fail2ban-regex not parsing journalmatch correctly
2015-05-25 10:50:34 -04:00
Yaroslav Halchenko
8c4d4aa7fb
minor: no tripple empty lines
2015-05-25 10:42:19 -04:00
Yaroslav Halchenko
3ac1f057f5
Merge pull request #1058 from jomu78/master
...
add froxlor-auth filter and jail
2015-05-25 10:40:29 -04:00
Joern Muehlencord
de931e6e6b
Merge branch 'master' of https://github.com/jomu78/fail2ban
2015-05-25 13:51:56 +02:00
Joern Muehlencord
4296d1a9a9
add froxlor-auth filter and jail
2015-05-25 13:51:06 +02:00
Joern Muehlencord
14a9a2d968
add froxlor-auth filter and jail 0
2015-05-25 13:48:25 +02:00
Joern Muehlencord
964cdb5d9b
add froxlor-auth filter and jail
2015-05-25 13:44:50 +02:00
Ivan Poddubny
38d9f3e609
Asterisk security log: add tests and update ChangeLog
2015-05-25 08:32:49 +03:00
Ivan Poddubny
7a4e6fa6e5
Asterisk security log: add support for websocket protocol events
...
Thanks to @kcormier.
2015-05-25 08:13:30 +03:00
Ivan Poddubny
988d9a08da
Asterisk security log: accept events containing Response/ExpectedResponse
...
Event containing Challenge may come without ReceivedChallenge, but with
Response and ExpectedResponse.
Also Challenge now accepts '/' character, since it is used at least by PJSIP.
2015-05-25 08:12:51 +03:00
Ivan Poddubny
189265a323
Asterisk security log: accept SessionID of PJSIP events
...
Unlike chan_sip and manager, PJSIP populates SessionID using
Call-Id header of a related SIP message.
As Call-Id of a SIP message can contain almost anything,
the regular expression for SessionID has been loosened.
2015-05-25 08:11:34 +03:00
Ivan Poddubny
ab2ac1a367
Asterisk security log: accept <unknown> in AccountID
2015-05-24 12:47:55 +03:00
Ivan Poddubny
977f9955e7
Asterisk security log: accept EventTV in ISO8601
...
Asterisk uses ISO8601 dates in security log since version 12.
Closes #988
2015-05-24 12:46:54 +03:00
Steven Hiscocks
0c869910ea
BF: Fix fail2ban-regex not parsing journalmatch correctly
2015-05-09 10:26:14 +01:00
Anton Shestakov
a61cd4687e
Merge 56e5821c06 into ab74a35b8a
2015-04-30 08:56:37 +00:00
Anton Shestakov
56e5821c06
Match unknown user in dovecot's passwd-file auth database
2015-04-30 16:53:10 +08:00
Yaroslav Halchenko
ab74a35b8a
Merge pull request #1038 from yarikoptic/bf-pypy
...
BF: download/use 2.5.1 release of PyPy to avoid problems with dailies
2015-04-29 10:23:30 -04:00
Yaroslav Halchenko
21b7dfcae9
BF: download/use 2.5.1 release of PyPy to avoid problems with dailies
2015-04-29 10:05:05 -04:00
Yaroslav Halchenko
fb336276d4
post-release tune ups
...
Conflicts:
ChangeLog
README.md
2015-04-29 09:02:48 -04:00
Yaroslav Halchenko
acc4c2d104
Hope for release tomorrow
2015-04-28 23:52:48 -04:00
Yaroslav Halchenko
840fea9f71
Merge commit '0f75ed5e2ab1159e45a7771a7a4e90c877ec848e'
...
* commit '0f75ed5e2ab1159e45a7771a7a4e90c877ec848e':
Just use a system wide python in the tests digest.py
DOC: Slight tune up to RELEASE doc -- no need for PYTHONPATH to run tests
MANIFEST: updated for some new files, sorted all entries, removed some duplicates
Initial changes for the release -- simplified ChangeLog header etc
2015-04-28 23:51:32 -04:00
Yaroslav Halchenko
c0e1333fe6
BF: if no /dev/log on Linux -- don't expect setting syslog to work
2015-04-28 23:51:00 -04:00
Yaroslav Halchenko
ced4852383
Merge pull request #1037 from ambrice/ufw
...
Fix actions in ufw.conf
2015-04-28 20:11:58 -04:00
Aaron Brice
7ae0ef2408
Fix actions in ufw.conf
...
On Ubuntu 15.04 the ufw action was not working.
- With empty <application>, receiving errors:
2015-04-24 16:28:35,204 fail2ban.filter [8527]: INFO [sshd] Found 43.255.190.157
2015-04-24 16:28:35,695 fail2ban.actions [8527]: NOTICE [sshd] Ban 43.255.190.157
2015-04-24 16:28:35,802 fail2ban.action [8527]: ERROR [ -n "" ] && app="app " -- stdout: b''
2015-04-24 16:28:35,803 fail2ban.action [8527]: ERROR [ -n "" ] && app="app " -- stderr: b''
2015-04-24 16:28:35,803 fail2ban.action [8527]: ERROR [ -n "" ] && app="app " -- returned 1
- With action = ufw[application=OpenSSH], it was silently not doing
anything (no errors after "Ban x.x.x.x", but no IP addresses in ufw
status).
Re-arranged the bash commands on two lines, and it works with or without
<application>.
2015-04-28 11:39:00 -07:00
Yaroslav Halchenko
4aafb2d4ac
Merge pull request #1035 from leeclemens/add-drupal-filter
...
Add drupal-auth filter and jail
2015-04-27 14:39:21 -04:00
Lee Clemens
8f792f52fb
Add drupal-auth filter and jail
2015-04-27 13:10:27 -04:00
Yaroslav Halchenko
0f75ed5e2a
Just use a system wide python in the tests digest.py
...
to stay inline with the other scripts
2015-04-26 21:57:13 -04:00
Yaroslav Halchenko
1784205ff8
DOC: Slight tune up to RELEASE doc -- no need for PYTHONPATH to run tests
2015-04-26 21:49:58 -04:00
Yaroslav Halchenko
1fb867b839
MANIFEST: updated for some new files, sorted all entries, removed some duplicates
2015-04-26 21:47:28 -04:00
Yaroslav Halchenko
ca849b93dc
Initial changes for the release -- simplified ChangeLog header etc
2015-04-26 21:39:54 -04:00
Yaroslav Halchenko
23d9e22477
Merge pull request #1001 from leeclemens/bf/1000-asteriskBlocksSelf
...
Match hacking attempt IP instead of asterisk server IP (closes #1000 )
2015-04-26 21:02:04 -04:00
Lee Clemens
b530d88eca
Merge remote-tracking branch 'upstream/master' into bf/1000-asteriskBlocksSelf
...
Conflicts:
ChangeLog
2015-04-26 15:13:59 -04:00
Yaroslav Halchenko
878cbd008e
Merge pull request #1024 from themanwhosold/master
...
updated filter.d/sshd.conf
2015-04-17 08:06:25 -04:00
Markus Oesterle
f8c7247f42
added \s after host
2015-04-17 10:22:01 +02:00
Markus Oesterle
5f2807b41f
replaced .* before rhost with regex matching all the previous fields
2015-04-17 10:04:35 +02:00
Markus Oesterle
6ba389c70c
Fixed typo in filter description authentification instead of authentication
2015-04-16 23:43:57 +02:00
Markus Oesterle
7a1f1c6b0c
Fixed the UTC -> CEST difference...
2015-04-16 21:54:57 +02:00
Markus Oesterle
b9a09af914
Added changes to ChangeLog & updated sample test cases
2015-04-16 21:33:57 +02:00
Markus Oesterle
8825a5f31b
updated filter.d/sshd.conf
...
Added line to match sshd auth errors on OpenSuSE systems
2015-04-16 19:48:28 +02:00
Viktor Szépe
e776a4e1ab
Update proftpd.conf
2015-04-08 15:57:39 +02:00
Yaroslav Halchenko
13d56af981
Merge pull request #1018 from opoplawski/no_network
...
Do not run smtp tests if no_network set
2015-04-07 21:33:09 -04:00
Orion Poplawski
aa8113c128
Do not run smtp tests if no_network set
2015-04-07 15:52:29 -06:00
Viktor Szépe
f9e8a99a79
Non-US locale warning for proftpd
2015-04-06 17:04:41 +02:00
Thomas Mayer
923d807ef8
use human-readable variable names (issue #1003 )
2015-03-29 18:18:30 +02:00
Thomas Mayer
675c3a7c95
use printf instead of echo for POSIX compatibility (issue #1003 )
2015-03-29 18:08:47 +02:00
Thomas Mayer
ac1e41ea70
Revert "remove '-ne' option as it's not interpreted any way (issue #1003 )"
...
This reverts commit 4a598070c8 .
2015-03-29 17:54:25 +02:00
Thomas Mayer
4a598070c8
remove '-ne' option as it's not interpreted any way (issue #1003 )
2015-03-28 06:58:01 +01:00
Thomas Mayer
1c2e8f4185
Add myself to the THANKS section
2015-03-27 19:12:05 +01:00
Thomas Mayer
80f11a4d28
Add empty Init Section to pass tests (issue #1003 )
2015-03-27 18:36:09 +01:00
Thomas Mayer
c0cf3daac8
Add myself to the changelog
2015-03-27 18:20:25 +01:00
Thomas Mayer
c9b24839e4
Character detection heuristics for whois output via optional setting in mail-whois*.conf ( Closes #1003 )
...
when set by user,
- detects character set of whois output (which is undefined by RFC 3912) via heuristics of the file command
- converts whois data to UTF-8 character set with iconv
- sends the whois output in UTF-8 character set to mail program
- avoids that heirloom mailx creates binary attachment for input with unknown character set
2015-03-27 14:27:41 +01:00
Csaba Tóth
0720c831b7
Fix of LC_TIME usage, it should be LC_ALL
2015-03-26 03:02:02 +01:00
Yaroslav Halchenko
c926af1fce
Merge pull request #1002 from sebres/_bf/fix-invalid-ip
...
fix test for invalid IP (use TEST-NET-1 according to RFC 5737)
2015-03-25 14:02:00 -04:00
Yaroslav Halchenko
b2c1673d28
BF: if install pypy -- come back to original directory
2015-03-25 12:56:25 -04:00
Yaroslav Halchenko
eb05cd7bd5
BF(OSX): apparently exceptions could not be compared for identity, use repr
2015-03-25 11:27:22 -04:00
sebres
6da0c4ad48
very long time resolving IP for address "abcdef" on some PDC, under NAT etc. - replaced via "abcdef.abcdef" to prevent searching in local domains;
2015-03-25 01:50:51 +01:00
sebres
c5ba76aab8
fix test for invalid IP (use TEST-NET-1 according to RFC 5737):
...
since fef031b3cd failed, because on some platforms like vm:debian 10.0.0.0 returns 'localhost' (intern network).
2015-03-25 01:24:33 +01:00
Lee Clemens
72f4bcfbff
Match hacking attempt IP instead of asterisk server IP ( closes #1000 )
2015-03-24 19:03:26 -04:00
Yaroslav Halchenko
d28880fdca
Merge pull request #997 from yarikoptic/bf/long-purge-for-recidive
...
DOC: make a warning for recidive jail to increase dbpurgeage (Closes #964 )
2015-03-23 21:30:04 -04:00
Yaroslav Halchenko
54f111429d
BF: fixing up version comparison for pypy. Issue appeared in 2.5.0
...
00:11 yoh: upgraded to 2.5.0 from debianexperimental and now reproduced locally
00:12 yoh: why pypy --version directs output to stderr? thereis no error
00:12 mattip: ok, can you try with a nightly from http://buildbot.pypy.org/nightly/trunk ?
00:15 * yoh running with 2.6.0-alpha0...
00:16 yoh: clean -- no crash
2015-03-23 21:28:16 -04:00
Yaroslav Halchenko
9339293413
ENH: minor formatting, no functional changes
2015-03-23 21:26:17 -04:00
ediazrod
5fdd1d1ded
Update shorewall-ipset-proto6.conf
2015-03-23 00:56:37 +01:00
ediazrod
e26a1ad6b6
Update shorewall-ipset-proto6.conf
2015-03-23 00:55:06 +01:00
Yaroslav Halchenko
4a83741397
BF: do not expect setting logtarget to SYSLOG to work on non-Linuxes
...
I have no BSD buildbots available for *BSDs etc, so can't speak for all, but
http://nipy.bic.berkeley.edu/builders/fail2ban-py2.6-osx-10.6_master/builds/151/steps/shell_1/logs/stdio
suggests that logically fails on OSX
2015-03-21 22:30:58 -04:00
Yaroslav Halchenko
56aacf872c
Merge pull request #952 from ache/master
...
Update bsd-ipfw.conf
2015-03-21 21:46:54 -04:00
Yaroslav Halchenko
02836b599c
Added a comment about systemd backend for jails with logs outside of journal ( Closes #959 )
2015-03-21 21:25:50 -04:00
Yaroslav Halchenko
320a28a4a4
DOC: make a warning for recidive jail to increase dbpurgeage ( Closes #964 )
2015-03-21 20:50:03 -04:00
Yaroslav Halchenko
938e6343ea
Merge pull request #996 from yarikoptic/bf/no-dns-module
...
BF/TST: expect ['error'] as a value if no dns module available
2015-03-21 20:27:15 -04:00
Yaroslav Halchenko
d5d8bc8134
Merge pull request #986 from yarikoptic/bf/pypy-2.4.0
...
BF: use daily build of pypy until next one gets released
2015-03-21 20:26:45 -04:00
Yaroslav Halchenko
382e7f02ca
BF: expect ['error'] as a value if no dns module available
...
As many buildbots show:
e.g. http://nipy.bic.berkeley.edu/builders/fail2ban-py2.7-osx-10.8_master/builds/163/steps/shell_1/logs/stdio
2015-03-21 16:04:34 -04:00
Yaroslav Halchenko
782629c256
Merge pull request #985 from yarikoptic/bf/bad_file_descr_3.4
...
BF: asyncore.loop poll=True for recent (>=3.4) pythons too
2015-03-21 13:31:10 -04:00
Yaroslav Halchenko
3f3ddaceae
print travis python version to figure out why not in effect
2015-03-06 08:53:12 -05:00
Yaroslav Halchenko
dd9b5f75af
BF: use daily build of pypy until next one gets released
2015-03-06 00:20:17 -05:00
Yaroslav Halchenko
31d107d181
BF: asyncore.loop poll=True for recent (>=3.4) pythons too
...
should avoid
File /usr/lib/python3.4/asyncore.py, line 208, in loop
poll_fun(timeout, map)
File /usr/lib/python3.4/asyncore.py, line 145, in poll
r, w, e = select.select(r, w, e, timeout)
OSError: [Errno 9] Bad file descriptor
2015-03-05 22:52:40 -05:00
Yaroslav Halchenko
daa2a9e5d8
Merge pull request #975 from sebres/gh-973-fix
...
BF: binding parameter error (unsupported type) (closes gh-973) ...
2015-03-05 22:47:45 -05:00
Yaroslav Halchenko
954075449d
BF: fixed casing in __sigUSR1handler
2015-02-26 20:59:52 -05:00
Yaroslav Halchenko
e52790073d
Merge pull request #979 from tgyurci/master
...
Flush logs at USR1 signal
2015-02-26 21:00:07 -05:00
Teubel György
0254cbf7fb
Flush logs at USR1 signal
2015-02-26 23:23:10 +01:00
ediazrod
d0887f3234
This is a especific configuration for shorewall ipset proto6
...
Use ipset proto6 in shorewall. You must follow the rules to enable ipset in you blacklist
if you have a lot of spam (my case) is better use ipset rather than shorewall command line (is my firewall)
stop fail2ban with shorewall on one list of 1000 Ips takes 5 min with ipset in shorewall 10 sec.
2015-02-26 18:48:31 +01:00
sebres
5ab30c88c2
more stable handling of json dump/load different encoded strings for older python versions;
...
extended test cases (more precise, python version insensitive, etc.)
2015-02-25 22:14:49 +01:00
sebres
2bfe22aa66
makes test case more precise;
2015-02-25 15:05:32 +01:00
sebres
6c788a32ee
BF: binding parameter error (unsupported type) by writing json with invalid encoded lines into sqlite database (gh-973);
...
especially python < 3.0; try to prevent occurring such errors in the future;
2015-02-25 11:56:11 +01:00
Lee Clemens
50cbd4e9eb
Merge pull request #961 from yarikoptic/enh/logencoding_msg
...
ENH: explicitly hint on logencoding setting in jail (Close #909 )
2015-02-18 21:19:18 -05:00
Yaroslav Halchenko
82d5e6b840
ENH: explicitly hint on logencoding setting in jail ( Close #909 )
2015-02-18 21:00:35 -05:00
Yaroslav Halchenko
83805ee5dc
Changelog for preceding merge
2015-02-14 16:07:28 -05:00
Yaroslav Halchenko
e788e3823e
Merge pull request #965 from TorontoMedia/master
...
Split output of firewallcmd list into separate lines for grepping (Close #908 )
2015-02-14 16:06:10 -05:00
TorontoMedia
b4f1f613bb
Update firewallcmd-allports.conf
2015-02-14 12:32:36 -05:00
TorontoMedia
0fac7e40b6
Update firewallcmd-multiport.conf
2015-02-14 12:31:33 -05:00
Yaroslav Halchenko
54e182e017
Merge pull request #955 from sebres/fail2ban-regex-gh-954
...
BF: fail2ban-regex does not read '.local' file of given filter (Close #954 )
2015-02-14 09:44:54 -05:00
Yaroslav Halchenko
ae2af0d51b
Minor tune up to changelog (we should eventually just make it into .md format)
2015-02-14 09:37:13 -05:00
Yaroslav Halchenko
07b0ab07ad
Merge branch 'master' of https://github.com/rumple010/fail2ban
...
* 'master' of https://github.com/rumple010/fail2ban :
Changed default TTL value to 60 seconds.
Added a reminder to create an nsupdate.local file to set required options.
Modified the ChangeLog and THANKS files to reflect the addition of action.d/nsupdate.conf.
add nsupdate action
Conflicts:
ChangeLog
2015-02-14 09:32:05 -05:00
Yaroslav Halchenko
be75519402
Merge pull request #956 from yarikoptic/enh/badips_categories
...
ENH: check badips.com response on presence of "categories" in it
2015-02-14 09:30:26 -05:00
sebres
74c6f6ac4b
BF: fail2ban-regex does not read '.local' file of given filter (gh-954)
2015-02-13 15:36:00 +01:00
Yaroslav Halchenko
d5e68abf95
ENH: check badips.com response on presence of "categories" in it
...
As https://travis-ci.org/fail2ban/fail2ban/jobs/50609529 query might fail in
that response would not contain "categories". With this change we will handle
it explicitly and will spit out ValueError, providing information about
the response so it could be troubleshooted
2015-02-13 08:55:35 -05:00
Ache
ae1451b29f
Update bsd-ipfw.conf
...
Deleting not existent is not error.
Adding already present is not error.
Otherwise all those entries becomes stale forever, not removed and its number increases over time.
2015-02-08 15:55:32 +03:00
Yaroslav Halchenko
3fb2becddb
Merge pull request #949 from leeclemens/enh/configSyslogSocket
...
Configure Syslog Socket Path (closes #814 )
2015-02-06 20:08:15 -05:00
Lee Clemens
6268eb32be
Use syslogsocket value "auto" to determine syslog socket's path
2015-02-06 19:14:09 -05:00
Yaroslav Halchenko
b46ac0b58e
Merge pull request #950 from lwh/master
...
Fixed grammatical error in emails sent
2015-02-06 11:51:19 -05:00
Luke Hollins
549ab24e70
Fixed grammatical error in emails sent
2015-02-06 11:47:03 -05:00
Yaroslav Halchenko
119a7bbb16
Merge pull request #939 from szepeviktor/geoip
...
Added sendmail-geoip-lines.conf
2015-02-06 11:32:41 -05:00
Viktor Szépe
4c88a00c28
Line notes implemented
2015-02-06 17:22:30 +01:00
Lee Clemens
d676a9fd4f
update ChangeLog with syslogsocket config enhancement
2015-02-05 23:48:18 -05:00
Lee Clemens
445fd7367f
Configure Syslog Socket Path
2015-02-05 23:44:57 -05:00
Yaroslav Halchenko
40068f5f31
Merge pull request #933 from mrc0mmand/nginx-botsearch
...
Add jail nginx-botsearch and refactor common with apache-botsearch regexes into botsearch-common
2015-02-04 09:27:43 -05:00
Yaroslav Halchenko
eaca33e227
Merge branch 'enh/clarifyDnsUtilsMethods' of https://github.com/leeclemens/fail2ban
...
* 'enh/clarifyDnsUtilsMethods' of https://github.com/leeclemens/fail2ban :
Update ChangeLog
Clarify filter.DNSUtils functions' terminology and add unittests
Conflicts:
ChangeLog -- rephrased a bit as well
2015-02-03 20:29:03 -05:00
Lee Clemens
ed71a7cd22
Update ChangeLog
2015-02-03 20:23:25 -05:00
Lee Clemens
b28fea4d41
Clarify filter.DNSUtils functions' terminology and add unittests
2015-02-03 20:19:39 -05:00
František Šumšal
9bd25f51c1
Added ChangeLog and THANKS entry
2015-02-04 02:19:15 +01:00
František Šumšal
642e425f75
Merge branch 'master' into nginx-botsearch
2015-02-04 02:18:14 +01:00
Yaroslav Halchenko
5b3aa42c42
Merge pull request #945 from leeclemens/ENH/ChangeLogForLogIgnoreCause
...
Update ChangeLog from PR 930
2015-02-03 20:16:30 -05:00
Yaroslav Halchenko
43a30f0ad6
Added to CONTRIBUTING.md minimal guidelines for PRs
2015-02-03 20:14:53 -05:00
František Šumšal
eb0d086ed0
Merge branch 'master' into nginx-botsearch
2015-02-04 02:13:33 +01:00
Lee Clemens
4091fdde27
Update ChangeLog from PR 930
2015-02-03 19:54:23 -05:00
František Šumšal
1c6d2074fb
Changed default settings for nginx-botseach filter
2015-02-04 01:48:59 +01:00
Yaroslav Halchenko
991096e599
Merge pull request #930 from leeclemens/ENH/916-logCauseOfIgnore
...
Conditionally log Ignore IP, and pass in reason (Closes #916 )
2015-02-03 19:24:59 -05:00
Yaroslav Halchenko
51333bb0a6
just a bit of description for a test case
2015-02-03 18:38:19 -05:00
Lee Clemens
50d18f68df
fix typo (false positive test)
2015-02-03 18:18:09 -05:00
Lee Clemens
c755138672
create OK and NOK methods
2015-02-03 18:11:49 -05:00
Lee Clemens
8233f21fc2
Remove duplicate unittests
2015-02-03 18:06:30 -05:00
Lee Clemens
aa848a5f9e
Combine ignore cause unitests
2015-02-03 18:02:42 -05:00
Orion Poplawski
e7ff7e90b7
[postfix-sasl] update regexes
...
- Add : to match "SASL LOGIN authentication failed: Password:"
- Add ignoreregex to ignore system authentication issues:
"warning: unknown[1.1.1.1]: SASL LOGIN authentication failed: Connection lost to authentication server"
- Add test log messages for both
2015-02-03 11:30:16 -07:00
František Šumšal
fb0f463eac
Include consistency
2015-02-03 15:54:05 +01:00
František Šumšal
705718be52
Filter apache-botsearch.conf now loads variables from botsearch-common.conf
2015-02-03 04:44:33 +01:00
František Šumšal
18778d9174
Created botsearch-common.conf
...
File contains variables used in -botsearch filters
2015-02-03 04:25:47 +01:00
Lee Clemens
3186df55e3
add Ignore DNS and IP test cases
2015-02-02 21:55:44 -05:00
Yaroslav Halchenko
646c799231
Changelog for above merge
2015-02-02 21:46:38 -05:00
Yaroslav Halchenko
1fbafa46c9
Merge pull request #918 from sebres/issue/161
...
Issue/161
2015-02-02 21:44:57 -05:00
Yaroslav Halchenko
73af02ffc6
Merge pull request #940 from leeclemens/ENH/ApacheFakeGoogleBot
...
New jail: apache-fakegooglebot
2015-02-02 21:44:04 -05:00
Yaroslav Halchenko
df581fe6e2
Merge pull request #929 from opoplawski/pam_auth
...
Add filter variable __pam_auth to allow customize for setups with multiple authorization schemes (Close #928 )
2015-02-02 21:42:10 -05:00
Yaroslav Halchenko
7f2d1a7269
minor changelog entry reformatting
2015-02-02 21:37:24 -05:00
Yaroslav Halchenko
7ada96b4e9
Merge pull request #932 from opoplawski/dovecot
...
Dovecot - dovecot auth failure from EL7
2015-02-02 21:37:28 -05:00
František Šumšal
f8fe165cd2
Switched from tabs to spaces for indents
2015-02-03 03:35:22 +01:00
Yaroslav Halchenko
767ac4ecac
Merge branch 'master' of git://github.com/fail2ban/fail2ban
...
* 'master' of git://github.com/fail2ban/fail2ban:
Remove trailing semicolons
2015-02-02 21:21:54 -05:00
Yaroslav Halchenko
8f6d9c6a5a
Merge branch 'enh/local_time_zone' of https://github.com/yarikoptic/fail2ban
...
* 'enh/local_time_zone' of https://github.com/yarikoptic/fail2ban :
fixed typos, thanks szepeviktor for review
ENH: use non-UTC date invocation (without -u) and report offset for localzone (%z)
Conflicts:
ChangeLog
2015-02-02 21:21:44 -05:00
Yaroslav Halchenko
96ae041132
fixed typos, thanks szepeviktor for review
2015-02-02 21:21:37 -05:00
Yaroslav Halchenko
fc0ac45f55
Merge pull request #942 from leeclemens/ENH/RemoveTrailingSemicolons
...
Remove trailing semicolons
2015-02-02 20:56:21 -05:00
Lee Clemens
2d266d96d5
Remove trailing semicolons
2015-02-02 19:03:43 -05:00
Lee Clemens
b725db04d8
Add ignorecommands to MANIFEST*'s
2015-02-02 15:03:44 -05:00
Lee Clemens
eb17b68641
fix test for invalid IP
2015-02-02 14:03:35 -05:00
Lee Clemens
fef031b3cd
test ipToName Exception
2015-02-02 14:01:48 -05:00
Lee Clemens
4cfbb840ad
move test to more sensible function name
2015-02-02 13:40:56 -05:00
Lee Clemens
0463518d28
Add testcase for DNSUtils.ipToName
2015-02-02 13:14:53 -05:00
Lee Clemens
d0986148f0
Merge branch 'yarikoptic-enh/fakegooglebot' into ENH/ApacheFakeGoogleBot
2015-02-02 13:02:19 -05:00
Lee Clemens
841c476045
Merge branch 'enh/fakegooglebot' of https://github.com/yarikoptic/fail2ban into yarikoptic-enh/fakegooglebot
...
Conflicts:
config/filter.d/ignorecommands/apache-fakegooglebot
2015-02-02 13:01:23 -05:00
Yaroslav Halchenko
15b65c7ad2
NF: apache-fakegooglebot ignorecommand + DNSUtils.ipToName
2015-02-02 12:19:20 -05:00
Lee Clemens
7e94ba6f0c
Remove implementation specific suffix
2015-02-02 11:43:05 -05:00
Lee Clemens
854915920f
Remove implementation specific suffix
2015-02-02 11:38:23 -05:00
Lee Clemens
00961d5281
Remove ignorecommand addition from ChangeLog
2015-02-02 11:36:21 -05:00
Lee Clemens
38415d2cf1
Add trailing comma back to list
2015-02-02 11:29:27 -05:00
Lee Clemens
af078532ac
New jail: apache-fakegooglebot
...
Detects fake googlebot user agents in apache access log
2015-02-02 00:42:01 -05:00
Viktor Szépe
0430e0dacc
Changelog entry for sendmail-geoip-lines
2015-02-01 00:24:40 +01:00
Viktor Szépe
1619ab3145
Added sendmail-geoip-lines.conf
2015-02-01 00:06:56 +01:00
Yaroslav Halchenko
cac0848d2c
Merge pull request #936 from yarikoptic/enh/ignoreregex
...
ENH: define ignoreregex for all filters explicitly, to avoid warnings (Closes #934 )
2015-01-31 11:53:27 -05:00
Yaroslav Halchenko
ec6a30efcf
ENH: define ignoreregex for all filters explicitly, to avoid warnings ( Closes #934 )
2015-01-30 10:38:28 -05:00
František Šumšal
c8e82f18b6
Add jail nginx-botsearch
...
Jail blocks requests for predefined non-existent folders. Based on
apache-botsearch jail.
2015-01-29 17:57:52 +01:00
Orion Poplawski
b4776a1ba0
Match dovecot unknown user line
2015-01-29 09:37:37 -07:00
Orion Poplawski
ee5c5b34d6
Add ChangeLog and THANKS entry
2015-01-29 09:14:41 -07:00
Orion Poplawski
3bc92610f7
Add dovecot auth failure from EL7
2015-01-29 09:11:59 -07:00
Yaroslav Halchenko
c96415da27
added $named and ufw to debian-initd (Debian bug #776572 )
2015-01-29 08:32:20 -05:00
Andrew St. Jean
6bdfe756cf
Changed default TTL value to 60 seconds.
2015-01-28 22:46:43 -05:00
Lee Clemens
f4341999cd
simplify/unify log message
2015-01-28 19:43:22 -05:00
Lee Clemens
076b103f97
Conditionally log Ignore IP, and pass in reason (ignoreip, ignorecommand)
2015-01-27 21:06:06 -05:00
Orion Poplawski
79b5a2617f
Add filter variable __pam_auth to allow easier changing of pam auth backend
2015-01-27 14:34:27 -07:00
Yaroslav Halchenko
64feb0fd16
Merge pull request #924 from leeclemens/ENH/StatusExtendedInfo
...
Add extended info to status output using Cymru
2015-01-26 22:55:12 -05:00
Andrew St. Jean
43732acae1
Added a reminder to create an nsupdate.local file to set required options.
2015-01-26 21:48:16 -05:00
Lee Clemens
887fa2a3a0
Update protocol with [FLAVOR] argument to status <JAIL>
2015-01-26 20:11:53 -05:00
Lee Clemens
297a32e6bb
Update test since JailThread.action was changed from property to method
2015-01-26 20:02:49 -05:00
Lee Clemens
767fc0d4d4
Merge branch 'ENH/StatusExtendedInfo' of github.com:leeclemens/fail2ban into ENH/StatusExtendedInfo
...
Conflicts:
ChangeLog
fail2ban/server/actions.py
fail2ban/server/server.py
fail2ban/server/transmitter.py
fail2ban/tests/servertestcase.py
2015-01-26 19:50:46 -05:00
Lee Clemens
486214585e
Update extended status to accept additional argument, flavor
...
Default to as-in behavior, or flavor=="basic"
2015-01-26 19:38:06 -05:00
Andrew St. Jean
e0f11ae722
Modified the ChangeLog and THANKS files to reflect the addition of action.d/nsupdate.conf.
2015-01-26 11:30:41 -05:00
Yaroslav Halchenko
085d0f72ed
ENH: use non-UTC date invocation (without -u) and report offset for localzone (%z)
2015-01-26 09:19:44 -05:00
Yaroslav Halchenko
65980a70fc
Merge branch 'enh/recidive-allports' of https://github.com/yarikoptic/fail2ban
...
* 'enh/recidive-allports' of https://github.com/yarikoptic/fail2ban :
use iptables-allports for recidive
Conflicts:
ChangeLog
2015-01-26 09:04:42 -05:00
Yaroslav Halchenko
4f28bc4fb0
Merge pull request #922 from leeclemens/ENH/pypy3TravisSupport
...
Add pypy3 Travis Support
2015-01-26 09:01:06 -05:00
rumple010
eb76dcd5a0
add nsupdate action
...
Adds a new action file that uses nsupdate to dynamically update a BIND
zone file with a TXT resource record representing a banned IP address.
Resource record is deleted from the zone when the ban expires.
2015-01-25 23:15:07 -05:00
Lee Clemens
dfe4d02f65
Remove version specific package
2015-01-24 12:45:42 -05:00
Lee Clemens
735c51adae
fix test of new banManager's instance
2015-01-24 12:45:42 -05:00
Lee Clemens
a0debea56a
test dnspython nxdomain returned
2015-01-24 12:45:42 -05:00
Lee Clemens
07a47179a7
conditionally import dnspython
2015-01-24 12:45:42 -05:00
Lee Clemens
ef3c942808
add dnspython[3] optional dependencies
2015-01-24 12:45:42 -05:00
Lee Clemens
405f363fe8
Conditionally test fail2ban-client status <JAIL> extended when dnspython is installed
2015-01-24 12:45:42 -05:00
Lee Clemens
ba69969057
Add pass to empty methods
2015-01-24 12:45:42 -05:00
Lee Clemens
60ac0a1a17
Add extended info to status output using Cyrmu
2015-01-24 12:45:42 -05:00
Lee Clemens
13b2aea48a
Remove version specific package
2015-01-24 12:22:34 -05:00
Lee Clemens
03db257c43
fix test of new banManager's instance
2015-01-23 16:18:09 -05:00
Lee Clemens
ce0fe8b907
test dnspython nxdomain returned
2015-01-23 16:00:49 -05:00
Lee Clemens
256c871121
conditionally import dnspython
2015-01-23 16:00:33 -05:00
Lee Clemens
8fd9d6a770
add dnspython[3] optional dependencies
2015-01-23 15:43:58 -05:00
Lee Clemens
a80ff26e15
Conditionally test fail2ban-client status <JAIL> extended when dnspython is installed
2015-01-23 15:40:00 -05:00
Lee Clemens
a8f057eab7
Add pass to empty methods
2015-01-23 15:27:33 -05:00
Lee Clemens
7d0700b6f8
merge ENH/UseTravisRetry
2015-01-23 15:20:56 -05:00
Yaroslav Halchenko
cfaa76a355
Merge pull request #923 from leeclemens/ENH/UseTravisRetry
...
Use travis_retry for commands which use the internet
2015-01-23 15:14:04 -05:00
Lee Clemens
625bcef8a1
Add extended info to status output using Cyrmu
2015-01-23 15:12:04 -05:00
Lee Clemens
d01099f347
Use travis_retry for commands which use the internet
2015-01-23 14:43:00 -05:00
Lee Clemens
40eb7a40f7
Add pypy3 Travis Support
2015-01-23 13:54:00 -05:00
Yaroslav Halchenko
17b3df004e
Merge pull request #919 from sebres/issue/907-embedded
...
Issue/907 + embedded
2015-01-21 11:53:25 -05:00
sebres
d0b932aaca
code review + more test cases (embedded replace in a string)
2015-01-21 09:44:55 +01:00
sebres
6b42878b8c
better recognition of embedded-recursive substitution to repeat interpolation
2015-01-20 17:31:17 +01:00
sebres
33e9e2174a
recursive/embedded version of issue/907;
...
test cases merged from remote-tracking branch 'yarikoptic:enh/embedded_tags' into issue/907
infinite busy loop on _escapedTags match in substituteRecursiveTags gh-907
2015-01-20 17:18:25 +01:00
sebres
607af36ad3
workaround for the "Bad file descriptor" issue on Python 2.7, gh-161 : asyncore.loop() using poll
...
by the way, prevents to write "'build/bdist.linux-x86_64' does not exist -- can't clean it" into stderr;
2015-01-20 14:08:30 +01:00
sebres
b04a51246f
infinite busy loop on _escapedTags match in substituteRecursiveTags gh-907
2015-01-20 11:32:15 +01:00
Yaroslav Halchenko
9720e0971e
Merge pull request #915 from sebres/issue/913
...
port[s] typo fixed in jail.conf/nginx-http-auth, issue gh-913
2015-01-19 09:10:31 -05:00
sebres
12e3cca3f2
port[s] typo fixed in jail.conf/nginx-http-auth, issue gh-913
2015-01-19 10:28:53 +01:00
Yaroslav Halchenko
fdd93d1475
ENH: unittest to catch actions without Init or Definition section and all must have actionban at least
2015-01-08 21:51:52 -05:00
Yaroslav Halchenko
083031524d
BF: adding missing Definition section header to firewallcmd-allports
2015-01-08 21:14:50 -05:00
TorontoMedia
d7b7f4bc91
Update firewallcmd-allports.conf
2015-01-08 21:06:43 -05:00
Yaroslav Halchenko
c7edd9e67f
Merge pull request #901 from leeclemens/ENH/PostfixRBL
...
Create Jail for Postfix based on RBL
2015-01-07 21:45:36 -05:00
Yaroslav Halchenko
995b1d18df
Merge pull request #906 from leeclemens/BF/755-strptime
...
Fix strptime thread safety issue
2015-01-07 20:40:14 -05:00
Lee Clemens
77677e43df
Merge branch 'master' of github.com:fail2ban/fail2ban into ENH/PostfixRBL
2015-01-07 20:39:04 -05:00
Yaroslav Halchenko
a8f26cd2b2
Merge pull request #905 from TorontoMedia/master
...
Firewallcmd-multiport.conf and Firewallcmd-allports.conf
2015-01-04 11:23:21 -05:00
Lee Clemens
4714028c69
Change case and tense for consistency
2015-01-03 16:16:23 -05:00
Lee Clemens
bda8dc1926
Merge branch 'master' of github.com:fail2ban/fail2ban into ENH/PostfixRBL
2015-01-03 15:29:42 -05:00
Lee Clemens
2f360ce447
Update Changelog with strptime fix
2015-01-03 15:26:34 -05:00
Lee Clemens
38641e741a
Merge branch 'master' of github.com:fail2ban/fail2ban into BF/755-strptime
...
Conflicts:
ChangeLog
2015-01-03 15:25:54 -05:00
Lee Clemens
541a747d79
Update Changelog with strptime fix
2015-01-03 15:19:58 -05:00
Lee Clemens
b26725f654
Move strptime workaround to fail2ban/__init__.py
2015-01-03 13:45:06 -05:00
Lee Clemens
d0bcacd97b
Fix strptime thread safety issue
...
strptime thread safety hack-around - http://bugs.python.org/issue7980
2015-01-02 02:55:40 -05:00
TorontoMedia
74c3d5d96c
Updated ChangeLog
2015-01-01 13:26:11 -05:00
TorontoMedia
948eec6425
Upd
2015-01-01 12:56:17 -05:00
TorontoMedia
7eed55266b
Created firewallcmd-multiport
2015-01-01 12:46:48 -05:00
TorontoMedia
9f91cb2fd8
Created firewallcmd-allports
2015-01-01 12:44:34 -05:00
TorontoMedia
a47001ea0e
Updated ChangeLog
2015-01-01 12:41:31 -05:00
TorontoMedia
1dfd9941df
Update THANKS
2015-01-01 05:33:20 -05:00
TorontoMedia
50e5fd9ed7
Create firewallcmd-multiport.conf
2015-01-01 05:32:41 -05:00
TorontoMedia
591e444753
Create firewallcmd-allports.conf
2015-01-01 05:32:06 -05:00
TorontoMedia
c2bb3253ad
Update ChangeLog
2015-01-01 05:27:18 -05:00
Yaroslav Halchenko
8fc32bb33f
Merge pull request #899 from leeclemens/ENH/gitignore
...
Add .idea dir to .gitignore
2014-12-31 18:48:57 -05:00
Yaroslav Halchenko
acfa83229b
Merge branch 'master' of git://github.com/fail2ban/fail2ban
...
* 'master' of git://github.com/fail2ban/fail2ban:
Update year in postfix logs test file
Add 'Client host rejected error message' regex Not sure if it was reworded (using Postfix 2.6) or a slightly different error, but I only have "Client host rejected: cannot find your hostname"
2014-12-31 01:12:56 -05:00
Lee Clemens
0f48cf4284
loosen up regex for spamhaus (spamcop says "Blocked" as part of url)
2014-12-30 19:14:39 -05:00
Lee Clemens
fe72a5585c
Create Jail for Postfix based on RBL
...
Use RBL blocks to ban addresses, unique Jail so maxretry can be set to 1 (vs postfix.conf)
2014-12-30 19:06:17 -05:00
Yaroslav Halchenko
37edb075e9
Merge pull request #900 from leeclemens/ENH/PostfixFilterNoQueue
...
Add 'Client host rejected error message' regex
2014-12-30 18:44:14 -05:00
Lee Clemens
e6ffa2e4a1
Update year in postfix logs test file
2014-12-30 18:10:19 -05:00
Lee Clemens
2d7429c47c
Add 'Client host rejected error message' regex
...
Not sure if it was reworded (using Postfix 2.6) or a slightly different error, but I only have "Client host rejected: cannot find your hostname"
2014-12-30 18:05:19 -05:00
Lee Clemens
6c34cf2e1e
Add .idea dir to .gitignore
2014-12-30 17:52:45 -05:00
Yaroslav Halchenko
d65c4f8f5d
moved debian's initd file to files/debian-initd from debian branch
2014-12-30 16:45:35 -05:00
Yaroslav Halchenko
bcfcefa203
Merge branch 'patch-2' of https://github.com/szepeviktor/fail2ban
...
* 'patch-2' of https://github.com/szepeviktor/fail2ban :
downcase example
Added an item to "Fixes"
postfix-sasl failregex case insensitive
2014-12-30 16:35:09 -05:00
Yaroslav Halchenko
35766e720d
Merge pull request #896 from szepeviktor/patch-3
...
Monit config
2014-12-30 15:57:14 -05:00
Viktor Szépe
10f68f4946
Update ChangeLog
2014-12-24 15:00:25 +01:00
Viktor Szépe
971c3d93fe
Monit config
...
Copy it to `/etc/monit/monitrc.d/fail2ban`
More info: https://github.com/szepeviktor/debian-server-tools/blob/master/monitoring/monit/monit-debian-setup.sh#L113
2014-12-24 14:45:48 +01:00
Yaroslav Halchenko
cc89649d04
BF: adjusted for new IP of example.com
...
Conflicts:
fail2ban/tests/filtertestcase.py
2014-12-21 21:45:30 -05:00
Viktor Szépe
a9b6a3754b
downcase example
2014-12-11 21:01:52 +01:00
Viktor Szépe
190f55b06e
Added an item to "Fixes"
2014-12-11 01:34:20 +01:00
Viktor Szépe
81b3dbde1d
postfix-sasl failregex case insensitive
2014-12-11 00:10:37 +01:00
Yaroslav Halchenko
fb2b52af14
Merge pull request #879 from sebres/broken-test-setup_install_root
...
testSetupInstallRoot will be always skipped, ...
2014-12-05 11:20:31 -05:00
sebres
a71a64733a
clean all after test setup (removes a build directory in current root of fail2ban)
2014-12-05 16:39:17 +01:00
Yaroslav Halchenko
20d212dcd8
Merge pull request #873 from bes-internal/patch-1
...
exim filter: added matching of possible port after host
2014-12-04 10:21:13 -05:00
bes-internal
ccc986b7d8
exim filter: correct failregex for exim with extended log options
...
incoming_interface, incoming_port, outgoing_port
2014-12-04 13:34:44 +03:00
sebres
7d4f071d4b
small fix: no cover for failed case
2014-12-03 15:25:27 +01:00
sebres
d62b046704
testSetupInstallRoot will be always skipped, because of "wrong" location of 'setup.py';
2014-12-03 14:45:46 +01:00
Yaroslav Halchenko
c5b5695eb9
Merge pull request #868 from sebres/addfailregex-gh-867
...
"known/" prefix to allow reuse specs from prev files for addfailregex/addignoreregex (Close #867 )
2014-12-01 09:02:50 -05:00
sebres
80fb48c5b0
Merge remote-tracking branch 'remotes/upstream/master' into sebres:addfailregex-gh-867
2014-12-01 13:14:42 +01:00
Yaroslav Halchenko
a170afcb76
Merge pull request #839 from sebres/fix-none-getattempt-lambda
...
Fix none getattempt lambda (close #838 , close #848 )
2014-11-29 21:33:09 -05:00
sebres
effdb450fc
better and scalable solution for gh-867 (and gh-868), using only name convention like %(known/failregex)s to add custom expressions, so no interface changes in jail.conf are necessary (for example see test-known-interp in test cases);
2014-11-29 20:33:32 +01:00
Yaroslav Halchenko
9bab6d0009
Changelog entry for preceding fix
2014-11-29 09:52:25 -05:00
Yaroslav Halchenko
4a620aa2ba
Merge pull request #869 from opoplawski/logpath
...
Separate php-url-fopen logpath by newline
2014-11-29 09:50:42 -05:00
Orion Poplawski
d8867807f5
Separate php-url-fopen logpath by newline
2014-11-28 22:04:09 -07:00
sebres
00c2ac4b03
python 2.6 compatibility: preventing RuntimeError: dictionary changed size during iteration.
2014-11-28 19:50:52 +01:00
sebres
d63b125877
interpolation of config readers extended with %(known/parameter)s.
...
(means last known option with name `parameter`).
2014-11-28 19:06:17 +01:00
sebres
1439152121
test cases extended (now correct)
2014-11-28 14:52:12 +01:00
sebres
cad09d2df3
BF: failregex declared direct in jail was joined to single line, (specifying of multiple expressions was not possible);
...
feature request (gh-867): new options for jail introduced addfailregex/addignoreregex: extends regex specified in filter (opposite to failregex/ignoreregex that overwrites it);
2014-11-28 03:17:47 +01:00
Yaroslav Halchenko
72370d2574
Merge pull request #858 from g1franc/master
...
Add ignoreregex to avoid warning on start
2014-11-15 10:22:12 -05:00
Guillaume FRANCOIS
a6a2dc868b
Add ignoreregex to avoid warning on start
2014-11-12 11:05:56 +01:00
Guillaume FRANCOIS
9269664350
Add ignoreregex to avoid warning on start
2014-11-12 10:30:28 +01:00
Yaroslav Halchenko
b379f5d51b
Merge pull request #852 from sebres/patch-1
...
Bug fix in formatJournalEntry, gh-851
2014-11-07 07:45:27 -05:00
Serg G. Brester
6dfddbcdf6
Bug fix in formatJournalEntry, gh-851
...
Unhandled exception in fail2ban 0.9.1 #851
2014-11-07 01:21:38 +01:00
Yaroslav Halchenko
2a3790f8e8
use iptables-allports for recidive
2014-11-04 13:24:54 -05:00
Yaroslav Halchenko
a44cfba9ae
Merge pull request #841 from opoplawski/firewallcmd-multiport
...
ChangeLog for firewallcmd-new multiport support
2014-10-30 18:32:26 -04:00
Orion Poplawski
21be983620
ChangeLog for firewallcmd-new multiport support
2014-10-30 16:11:34 -06:00
Yaroslav Halchenko
967485c2d0
improving grepping
2014-10-29 23:14:47 -04:00
Yaroslav Halchenko
efbf5064a1
Merge pull request #807 from xslidian/patch-1
...
grep IP at the start of lines
2014-10-29 23:07:10 -04:00
Yaroslav Halchenko
6d345a13f0
Merge pull request #840 from opoplawski/firewallcmd-multiport
...
Use multiport for firewallcmd-new
2014-10-29 23:03:56 -04:00
Orion Poplawski
01b2673e34
Use multiport for firewallcmd-new
2014-10-29 16:27:37 -06:00
sebres
92ba5ae09c
few confusing merge info helper
2014-10-29 22:08:44 +01:00
sebres
46a8899f20
code review
2014-10-29 19:27:45 +01:00
Yaroslav Halchenko
36abb5ed96
BF: fix $ for % in jail.conf. Debian bug #767255
2014-10-29 13:08:51 -04:00
sebres
8dbc04aa06
Test cases fixed:
...
testFail2BanExceptHook - use local sys.__excepthook__ to check was really executed and prevent write error in stderr.
2014-10-29 13:30:24 +01:00
sebres
518cc92ccc
actions: bug fix in lambdas in checkBan, because getBansMerged could return None (purge resp. asynchronous addBan), make the logic all around more stable;
...
test cases: extended with test to check action together with database functionality (ex.: to verify lambdas in checkBan);
database: getBansMerged should work within lock, using reentrant lock (cause call of getBans inside of getBansMerged);
2014-10-29 12:36:21 +01:00
Yaroslav Halchenko
7acddcbe4a
Post-release boost to .dev
2014-10-27 23:45:51 -04:00
Yaroslav Halchenko
a0115ee458
ENH: additional versioning changes
2014-10-27 21:49:40 -04:00
Yaroslav Halchenko
d0a5fe620f
Refreshed manpages
2014-10-27 21:47:48 -04:00
Yaroslav Halchenko
564eb3389b
ENH: fail early in generate-man + provide PYTHONPATH upstairs
2014-10-27 21:47:07 -04:00
Yaroslav Halchenko
987356d6c0
Changes for the 0.9.1 release versioning
2014-10-27 21:43:17 -04:00
Yaroslav Halchenko
9e8e4dde69
Populated MANIFEST with more entries which were preiously missed or duplicated. Sorted within each "section"
2014-10-27 21:43:11 -04:00
Yaroslav Halchenko
fc145eb795
Merge pull request #748 from pacop/master
...
ENH: Add dateTime format for PortSentry
2014-10-25 12:34:00 -04:00
Yaroslav Halchenko
8a453018a9
Merge pull request #830 from sebres/_tent/cache-config-read-fix1
...
fix: fail2ban-regex with filter file failed
2014-10-25 12:30:55 -04:00
pacop
b60e2bf42f
Add portsentry to changelog
2014-10-25 18:17:57 +02:00
pacop
e3a037ee3f
merge master
2014-10-25 18:15:34 +02:00
sebres
3dac765598
ConfigReader.touch renamed into protected _create_unshared
2014-10-25 17:20:01 +02:00
Yaroslav Halchenko
0b5413ec0b
Merge branch 'master' of git://github.com/fail2ban/fail2ban
...
* 'master' of git://github.com/fail2ban/fail2ban:
2014-10-25 10:38:28 -04:00
Florian Pelgrim
3dabd5fc83
DOC: documentation about available vagrantfile setup
...
manually picked up from a commit within
https://github.com/fail2ban/fail2ban/pull/786
2014-10-25 10:38:18 -04:00
Florian Pelgrim
6293e44889
Added myself into THANKS
2014-10-25 10:37:28 -04:00
Yaroslav Halchenko
b2b5d0b41c
Merge pull request #829 from yarikoptic/minimal_python2.6
...
ENH: remove obsolete code for python < 2.6 (we support >= 2.6)
2014-10-25 10:32:10 -04:00
Yaroslav Halchenko
e1a5decc00
DOC: adjust docs in mytime to place docs into docstrings
2014-10-25 09:34:37 -04:00
Yaroslav Halchenko
caa6006a31
ENH: do use @staticmethod (we are well beyond support of 2.4 now)
2014-10-25 09:25:18 -04:00
sebres
07d4badfd0
testExecuteTimeout fixed: give a test still 1 second, because system could be too busy
2014-10-24 05:42:58 +02:00
sebres
bef0502e6b
coverage: no cover (for failed except)
2014-10-24 05:28:35 +02:00
sebres
0b0ea41f87
fix: fail2ban-regex with filter file failed (after merging #824 , because test case missing);
...
test case for 'readexplicit' added;
2014-10-24 04:59:44 +02:00
Yaroslav Halchenko
d4015d6566
ENH: remove obsolete code for python < 2.6 (we support >= 2.6)
2014-10-23 14:51:51 -04:00
Yaroslav Halchenko
e2f49b7334
DOC: very minor (tabs/spaces)
2014-10-23 14:44:10 -04:00
Yaroslav Halchenko
78e1a13fad
Merge branch '_tent/cache-config-read' of https://github.com/sebres/fail2ban
...
* '_tent/cache-config-read' of https://github.com/sebres/fail2ban :
code review, change log entries added;
reset share/cache storage (if we use 'reload' in client with interactive mode)
normalize tabs/spaces in docstrings;
cache-config-read-v2 merged; logging normalized, set log level for loading (read or use shared) file(s) to INFO; prevent to read some files twice by read inside "_getIncludes" and by "read" self (occurred by only one file);
code review; more stable config sharing, configurator always shares it config readers now;
code review: use the same code (corresponding test cases - with sharing on and without it);
rewritten caching resp. sharing of ConfigReader and SafeConfigParserWithIncludes (v.2, first and second level cache, without fingerprinting etc.);
code review
ConfigReader/ConfigWrapper renamed as suggested from @yarikoptic; + code clarifying (suggested also);
Partially merge remote-tracking from 'sebres:cache-config-read-820': test cases extended, configurator.py adapted for test case.
ENH: keep spitting out logging to the screen in LogCaptureTestCases if HEAVYDEBUG
test case for check the read of config files will be cached;
more precise by test
ConfigWrapper class introduced: sharing of the same ConfigReader object between JailsReader and JailReader (don't read jail config each jail); sharing of the same DefinitionInitConfigReader (ActionReader, FilterReader) between all jails using that; cache of read a config files was optimized; test case extended for all types of config readers;
config cache optimized - prevent to read the same config file inside different resources multiple times; test case: read jail file only once;
test case for check the read of config files will be cached;
caching of read config files, to make start of fail2ban faster, see issue #820
2014-10-23 14:28:33 -04:00
Yaroslav Halchenko
5ac496d030
We better check that installation doesn't cause any errors as well
2014-10-12 17:28:35 -04:00
Yaroslav Halchenko
47441d1383
Merge remote-tracking branch 'origin/master'
...
* origin/master:
RF: moving logwatch setup/sample logs under files/logwatch
ENH: print rebans stats even if no "Failures" are logged, and reduce indentation in output
ENH: untabified and reindented entire script for sane formatting (no functional changes)
BF: logwatch -- fixing up regex for 'already banned'
Sample logfiles to test logwatch services script
Adjusting fail2ban logwatch script to match lines from 0.9 as well
2014-10-12 16:44:24 -04:00
Yaroslav Halchenko
86a5f42f73
BF: made tests util digest.py friendly to python3
2014-10-12 16:40:29 -04:00
Yaroslav Halchenko
98dc0844ce
Merge pull request #782 from yarikoptic/bf/logwatch
...
logwatch file (original 1.5 version + fixes for change of logs in 0.9)
2014-10-10 22:15:57 -04:00
sebres
7d3e6e9935
code review, change log entries added;
2014-10-10 20:06:58 +02:00
sebres
73a06d55a8
reset share/cache storage (if we use 'reload' in client with interactive mode)
2014-10-10 18:50:24 +02:00
sebres
7f5d4aa7a6
normalize tabs/spaces in docstrings;
2014-10-10 16:59:40 +02:00
sebres
95bdcdecaa
cache-config-read-v2 merged;
...
logging normalized, set log level for loading (read or use shared) file(s) to INFO;
prevent to read some files twice by read inside "_getIncludes" and by "read" self (occurred by only one file);
2014-10-10 16:49:08 +02:00
sebres
02a46d0901
code review;
...
more stable config sharing, configurator always shares it config readers now;
2014-10-10 12:05:49 +02:00
sebres
e0eb4f2358
code review: use the same code (corresponding test cases - with sharing on and without it);
2014-10-10 02:47:42 +02:00
sebres
c35b4b24d2
rewritten caching resp. sharing of ConfigReader and SafeConfigParserWithIncludes (v.2, first and second level cache, without fingerprinting etc.);
2014-10-10 02:10:13 +02:00
sebres
37952ab75f
code review
2014-10-09 19:51:53 +02:00
sebres
f67053c2ec
ConfigReader/ConfigWrapper renamed as suggested from @yarikoptic;
...
+ code clarifying (suggested also);
2014-10-09 19:01:49 +02:00
sebres
f6723a12ff
Merge branch 'cache-config-read-820' into _tent/cache-config-read
2014-10-09 18:01:31 +02:00
sebres
b62ce14ccd
Partially merge remote-tracking from 'sebres:cache-config-read-820':
...
test cases extended, configurator.py adapted for test case.
2014-10-09 18:00:45 +02:00
Yaroslav Halchenko
0c5f11079c
ENH: keep spitting out logging to the screen in LogCaptureTestCases if HEAVYDEBUG
2014-10-09 10:47:00 -04:00
sebres
f31607ded1
test case for check the read of config files will be cached;
...
Conflicts:
fail2ban/tests/clientreadertestcase.py -- removed not needed
time in imports
2014-10-09 10:30:17 -04:00
sebres
51cae63bf0
more precise by test
2014-10-09 15:39:58 +02:00
sebres
4244c87802
ConfigWrapper class introduced: sharing of the same ConfigReader object between JailsReader and JailReader (don't read jail config each jail);
...
sharing of the same DefinitionInitConfigReader (ActionReader, FilterReader) between all jails using that;
cache of read a config files was optimized;
test case extended for all types of config readers;
2014-10-09 14:51:08 +02:00
sebres
2a54e61238
config cache optimized - prevent to read the same config file inside different resources multiple times;
...
test case: read jail file only once;
2014-10-08 15:44:32 +02:00
sebres
af4b48e841
test case for check the read of config files will be cached;
2014-10-07 14:37:40 +02:00
pacop
ce4f2d1c88
added filter for PortSentry with jail and samples
2014-10-04 15:08:12 +02:00
pacop
37acc6b832
ENH: Add dateTime format for PortSentry
...
Added dateTime format for PortSentry with EPOCH format
2014-10-04 14:55:22 +02:00
sebres
d00af327c5
caching of read config files, to make start of fail2ban faster, see issue #820
2014-10-03 02:11:55 +02:00
Yaroslav Halchenko
05fcb1f104
Merge pull request #813 from schaal/tests-configdir-env-variable
...
tests: Add function to utils to calculate CONFIG_DIR
2014-10-01 14:19:26 -04:00
Daniel Schaal
270ea363d3
tests: define CONFIG_DIR in utils.
2014-10-01 19:50:03 +02:00
Yaroslav Halchenko
b912d61ccb
Merge pull request #818 from slowriot/master
...
adding filter to detect Shellshock attack attempts with Apache
2014-09-29 09:32:21 -04:00
SlowRiot
5d526bbeb1
forgot to add test case to last commit
2014-09-29 00:49:22 +01:00
SlowRiot
7b5dc9f24f
adding test case, changelog and thanks entries for apache shellshock filter
2014-09-26 18:48:56 +01:00
SlowRiot
fc5f729f01
adding jail conf for shellshock filter
2014-09-26 16:37:50 +01:00
SlowRiot
4f636eb0e3
adding filter to detect Shellshock attack attempts against bash scripts through apache. See http://seclists.org/oss-sec/2014/q3/650
2014-09-26 16:25:07 +01:00
Yaroslav Halchenko
bfaf33b6ba
Merge pull request #812 from nickweeds/master
...
Issue #810 : Update apache-auth.conf filter to match AH01630: client denied by server configuration
2014-09-14 21:01:50 -04:00
Nick Weeds
2c158fe168
Add apache filter for AH01630 client denied by server configuration
2014-09-14 21:54:05 +01:00
Yaroslav Halchenko
caa851e5c8
RF: moving logwatch setup/sample logs under files/logwatch
2014-09-14 09:48:14 -04:00
Yaroslav Halchenko
8f521b8551
DOC: Changelog and THANKS for previous changes
2014-09-13 10:27:37 -04:00
Yaroslav Halchenko
0e1f8f7f39
RF: remove those two additional failregexes for the postfix
...
see comment
https://github.com/fail2ban/fail2ban/pull/804\#discussion_r17512426
2014-09-13 10:25:27 -04:00
Yaroslav Halchenko
96c20c8379
Merge pull request #804 from pleasantone/master
...
Add support for postfix/submission/smtpd matching.
2014-09-13 10:24:06 -04:00
Yaroslav Halchenko
c58c4de9bc
ENH: add empty ignoreregex to avoid a warning ( Close #805 )
2014-09-13 10:18:37 -04:00
Dean Lee
ba44ff312b
grep IP at the start of lines
...
I'm not sure if this regex works best, so I'm patching this single file as a sample.
Don't forget to update `mail-whois-lines.conf` after this patch got merged.
For the following logs, `grep '[^0-9]199.48.161.87[^0-9]'` will output nothing, while `grep '\([^0-9]\|^\)199.48.161.87[^0-9]'` works:
<pre>199.48.161.87 - - [09/Sep/2014:13:38:54 +0800] "POST /wp-login.php HTTP/1.1" 403 4674 "-" "Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0" - hitsjapan.com
199.48.161.87 - - [09/Sep/2014:13:38:56 +0800] "POST /wp-login.php HTTP/1.1" 403 4674 "-" "Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0" - hitsjapan.com
199.48.161.87 - - [09/Sep/2014:13:38:58 +0800] "POST /wp-login.php HTTP/1.1" 403 4674 "-" "Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0" - hitsjapan.com
199.48.161.87 - - [09/Sep/2014:13:39:00 +0800] "POST /wp-login.php HTTP/1.1" 403 4674 "-" "Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0" - hitsjapan.com
199.48.161.87 - - [09/Sep/2014:13:39:05 +0800] "POST /wp-login.php HTTP/1.1" 403 4674 "-" "Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0" - hitsjapan.com
199.48.161.87 - - [09/Sep/2014:13:39:05 +0800] "POST /wp-login.php HTTP/1.1" 403 4674 "-" "Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0" - hitsjapan.com
199.48.161.87 - - [09/Sep/2014:13:39:13 +0800] "POST /wp-login.php HTTP/1.1" 403 4674 "-" "Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0" - hitsjapan.com
199.48.161.87 - - [09/Sep/2014:13:39:21 +0800] "POST /wp-login.php HTTP/1.1" 403 4674 "-" "Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0" - hitsjapan.com
199.48.161.87 - - [09/Sep/2014:13:39:32 +0800] "POST /wp-login.php HTTP/1.1" 403 4674 "-" "Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0" - hitsjapan.com
199.48.161.87 - - [09/Sep/2014:13:39:34 +0800] "POST /wp-login.php HTTP/1.1" 403 4674 "-" "Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0" - hitsjapan.com
199.48.161.87 - - [09/Sep/2014:13:39:34 +0800] "POST /wp-login.php HTTP/1.1" 403 168 "-" "Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0" - hitsjapan.com
199.48.161.87 - - [09/Sep/2014:13:39:34 +0800] "POST /wp-login.php HTTP/1.1" 403 168 "-" "Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0" - hitsjapan.com
199.48.161.87 - - [09/Sep/2014:13:39:35 +0800] "POST /wp-login.php HTTP/1.1" 403 168 "-" "Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0" - hitsjapan.com
199.48.161.87 - - [09/Sep/2014:13:39:35 +0800] "POST /wp-login.php HTTP/1.1" 403 168 "-" "Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0" - hitsjapan.com
199.48.161.87 - - [09/Sep/2014:13:39:35 +0800] "POST /wp-login.php HTTP/1.1" 403 168 "-" "Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0" - hitsjapan.com</pre>
2014-09-09 14:55:34 +08:00
Paul Traina
249e169d8e
Update test cases and also suport smtps per request.
2014-09-08 11:53:51 -07:00
Paul Traina
544cfaff2c
Add support for postfix/submission/smtpd matching.
2014-09-06 10:23:38 -07:00
Yaroslav Halchenko
b1c04f5fa2
ENH: print rebans stats even if no "Failures" are logged, and reduce indentation in output
2014-08-13 23:37:17 -04:00
Yaroslav Halchenko
decea64cf9
ENH: untabified and reindented entire script for sane formatting (no functional changes)
2014-08-13 23:28:03 -04:00
Yaroslav Halchenko
8b62353ab0
BF: logwatch -- fixing up regex for 'already banned'
2014-08-13 23:24:38 -04:00
Yaroslav Halchenko
3bd36ba40a
Sample logfiles to test logwatch services script
2014-08-13 23:15:31 -04:00
Yaroslav Halchenko
b0f26fa391
Adjusting fail2ban logwatch script to match lines from 0.9 as well
...
File itself includes additional log information about changes
2014-08-11 12:45:50 -04:00