Javier,<br><br>I had to make some changes to the example on the FreeSwitch wiki to get fail2ban working correctly. I also have a step-by-step cut&paste guide on <a href="http://wiki.voicenetwork.ca/wiki/Main_Page#Fail2Ban">http://wiki.voicenetwork.ca/wiki/Main_Page#Fail2Ban</a> for CentOS.<br>
<br><pre>[freeswitch-tcp]
enabled = true
port = 5060,5061,5080,5081
protocol = tcp
filter = freeswitch
logpath = /usr/local/freeswitch/log/freeswitch.log
action = iptables-allports[name=freeswitch-tcp, protocol=all]
sendmail-whois[name=FreeSwitch, dest=root, sender=<a href="mailto:fail2ban@example.org">fail2ban@example.org</a>]
[freeswitch-udp]
enabled = true
port = 5060,5061,5080,5081
protocol = udp
filter = freeswitch
logpath = /usr/local/freeswitch/log/freeswitch.log
action = iptables-allports[name=freeswitch-udp, protocol=all]
sendmail-whois[name=FreeSwitch, dest=root, sender=<a href="mailto:fail2ban@example.org">fail2ban@example.org</a>]<br><br></pre><br>Norman Tomlins<br>Voice Network Inc.<br><a href="http://www.VoiceNetwork.ca">http://www.VoiceNetwork.ca</a><br>
<br><br><div class="gmail_quote">2010/10/15 Javier Aristizábal <span dir="ltr"><<a href="mailto:javieraristizabal@gmail.com">javieraristizabal@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi folks, <div><br></div><div>I installed fail2ban CentOS 5.5. And i followed the wiki instructions to configure fail2ban with FreeSWITCH. After i edit jail.conf with this config:</div><div><br></div><div><div>[freeswitch-tcp]</div>
<div><br></div><div>enabled = true</div><div>port = 5060,5061,5080,5081</div><div>protocol = tcp</div><div>filter = freeswitch</div><div>logpath = /usr/local/freeswitch/log/freeswitch.log</div><div><br></div><div>
[freeswitch-udp]</div><div><br></div><div>enabled = true</div><div>port = 5060,5061,5080,5081</div><div>protocol = udp</div><div>filter = freeswitch</div><div>logpath = /usr/local/freeswitch/log/freeswitch.log</div>
<div>######</div><div><br></div><div>The fail2ban does not start, and the logs can not get anything.. Did anyone have the same thing?</div><div><br></div><div>The freeswtich.conf:</div><div><br></div><div><div># Fail2Ban configuration file</div>
<div>#</div><div># Author: Rupa SChomaker</div><div>#</div><div><br></div><div>[Definition]</div><div><br></div><div># Option: failregex</div><div># Notes.: regex to match the password failures messages in the logfile. The</div>
<div># host must be matched by a group named "host". The tag "<HOST>" can</div><div># be used for standard IP/hostname matching and is only an alias for</div><div># (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)</div>
<div># Values: TEXT</div><div>#</div><div>failregex = \[WARNING\] sofia_reg.c:\d+ SIP auth failure \(REGISTER\) on sofia profile \'\w+\' for \[.*\] from ip <HOST></div><div><br></div><div># Option: ignoreregex</div>
<div># Notes.: regex to ignore. If this regex matches, the line is ignored.</div><div># Values: TEXT</div><div>#</div><div>ignoreregex =</div></div><div><br></div><div><br></div><div>Thanks</div><br>-- <br>Javier Aristizábal<br>
<br>
</div>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup { position:absolute; z-index:9999; padding: 0px 0px; margin-left: 0px; margin-top: 0px; width: 240px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 13px;}</style>