<div dir="ltr">Please send request to fail2ban community.<br><div>As I know fail2ban is too difficult troubleshoot . On my servers fail2ban time to time is stop updating iptables rules. If it take place I restart fail2ban daemon.<br></div><div><br></div><div>Sergey.</div><br><div class="gmail_quote"><div dir="ltr">ср, 11 мая 2016 г. в 10:30, Mimiko <<a href="mailto:vbvbrj@gmail.com" target="_blank">vbvbrj@gmail.com</a>>:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello.<br>
<br>
I have this config for freeswitch:<br>
<br>
jail.local:<br>
<br>
[ssh]<br>
enabled = true<br>
port = ssh<br>
filter = sshd<br>
logpath = /var/log/auth.log<br>
maxretry = 5<br>
[freeswitch]<br>
enabled = true<br>
port = 5060,5061,5080,5081<br>
ignoreip = <a href="http://127.0.0.1/8" rel="noreferrer" target="_blank">127.0.0.1/8</a> <a href="http://10.10.0.0/16" rel="noreferrer" target="_blank">10.10.0.0/16</a><br>
filter = freeswitch<br>
logpath = /var/log/freeswitch/freeswitch.log<br>
maxretry = 1<br>
findtime = 600<br>
bantime = 60<br>
action = iptables-ban<br>
<br>
<br>
freeswitch.conf:<br>
<br>
[Definition]<br>
<br>
failregex = ^[-: \.\d]+ \[WARNING\] sofia_reg\.c:\d+ Can't find user<br>
\[\d+@[^\]]+\] from <HOST>$<br>
<br>
ignoreregex =<br>
<br>
<br>
<br>
When running<br>
<br>
fail2ban-regex /var/log/freeswitch/freeswitch.log<br>
/etc/fail2ban/filter.d/freeswitch.conf<br>
<br>
There are matches with failed users:<br>
<br>
/usr/share/fail2ban/server/filter.py:442: DeprecationWarning: the md5<br>
module is deprecated; use hashlib instead<br>
import md5<br>
<br>
Running tests<br>
=============<br>
<br>
Use regex file : /etc/fail2ban/filter.d/freeswitch.conf<br>
Use log file : /var/log/freeswitch/freeswitch.log<br>
<br>
<br>
Results<br>
=======<br>
<br>
Failregex<br>
|- Regular expressions:<br>
| [1] ^[-: \.\d]+ \[WARNING\] sofia_reg\.c:\d+ Can't find user<br>
\[\d+@[^\]]+\] from <HOST>$<br>
|<br>
`- Number of matches:<br>
[1] 18 match(es)<br>
<br>
Ignoreregex<br>
|- Regular expressions:<br>
|<br>
`- Number of matches:<br>
<br>
Summary<br>
=======<br>
<br>
Addresses found:<br>
[1]<br>
163.172.194.73 (Wed May 11 10:16:54 2016)<br>
163.172.194.73 (Wed May 11 10:18:02 2016)<br>
163.172.194.73 (Wed May 11 10:18:30 2016)<br>
163.172.194.73 (Wed May 11 10:18:40 2016)<br>
163.172.194.73 (Wed May 11 10:19:10 2016)<br>
163.172.194.73 (Wed May 11 10:19:29 2016)<br>
163.172.194.73 (Wed May 11 10:20:10 2016)<br>
163.172.194.73 (Wed May 11 10:20:30 2016)<br>
163.172.194.73 (Wed May 11 10:20:37 2016)<br>
163.172.194.73 (Wed May 11 10:21:42 2016)<br>
163.172.194.73 (Wed May 11 10:21:53 2016)<br>
163.172.194.73 (Wed May 11 10:22:00 2016)<br>
163.172.194.73 (Wed May 11 10:22:50 2016)<br>
163.172.194.73 (Wed May 11 10:23:13 2016)<br>
163.172.194.73 (Wed May 11 10:23:28 2016)<br>
163.172.194.73 (Wed May 11 10:23:30 2016)<br>
163.172.194.73 (Wed May 11 10:25:07 2016)<br>
163.172.194.73 (Wed May 11 10:25:29 2016)<br>
<br>
Date template hits:<br>
0 hit(s): MONTH Day Hour:Minute:Second<br>
0 hit(s): WEEKDAY MONTH Day Hour:Minute:Second Year<br>
0 hit(s): WEEKDAY MONTH Day Hour:Minute:Second<br>
0 hit(s): Year/Month/Day Hour:Minute:Second<br>
0 hit(s): Day/Month/Year Hour:Minute:Second<br>
0 hit(s): Day/Month/Year Hour:Minute:Second<br>
0 hit(s): Day/MONTH/Year:Hour:Minute:Second<br>
0 hit(s): Month/Day/Year:Hour:Minute:Second<br>
5196 hit(s): Year-Month-Day Hour:Minute:Second<br>
0 hit(s): Day-MONTH-Year Hour:Minute:Second[.Millisecond]<br>
0 hit(s): Day-Month-Year Hour:Minute:Second<br>
0 hit(s): TAI64N<br>
0 hit(s): Epoch<br>
0 hit(s): ISO 8601<br>
0 hit(s): Hour:Minute:Second<br>
0 hit(s): <Month/Day/Year@Hour:Minute:Second><br>
<br>
Success, the total number of match is 18<br>
<br>
However, look at the above section 'Running tests' which could contain<br>
important<br>
information.<br>
<br>
<br>
However, fail2ban does not ban that ip. Although when ssh login attempt<br>
is detected, fail2ban does ban the ip.<br>
<br>
I've checked the time and time zone and all ok. On server Local time is<br>
+3 from UTC. sshd log, freeswitch log and fail2ban log are in same time<br>
zone.<br>
<br>
What could be the culprit?<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div></div>