<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Linux Forum &mdash; fail2ban+asterisk не банит]]></title>
		<link>https://linuxforum.ru/viewtopic.php?id=30109</link>
		<atom:link href="https://linuxforum.ru/extern.php?action=feed&amp;tid=30109&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «fail2ban+asterisk не банит».]]></description>
		<lastBuildDate>Wed, 04 Sep 2013 12:58:42 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[fail2ban+asterisk не банит]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=361855#p361855</link>
			<description><![CDATA[<p>Перешел на CentOS 6.4 и asterisk 11 <br />Настраиваю fail2ban<br />jail.conf <br /></p><div class="codebox"><pre><code>[asterisk-iptables]

enabled  = true
filter   = asterisk
action   = iptables-allports[name=ASTERISK, protocol=all]
           sendmail-whois[name=ASTERISK, dest=root, sender=fail2ban@localhost]
logpath  = /var/log/asterisk/messages
maxretry = 3
findtime = 60
bantime = 36000
destemail = support@domain.ru</code></pre></div><p>asterisk.conf <br /></p><div class="codebox"><pre><code>[INCLUDES]

[Definition]

failregex = .*NOTICE.* .*: Registration from &#039;.*&#039; failed for &#039;&lt;HOST&gt;:.*&#039; - Wrong password
            .*NOTICE.* .*: Registration from &#039;.*&#039; failed for &#039;&lt;HOST&gt;:.*&#039; - No matching peer found
            .*NOTICE.* .*: Registration from &#039;.*&#039; failed for &#039;&lt;HOST&gt;:.*&#039; - No matching peer found
            .*NOTICE.* .*: Registration from &#039;.*&#039; failed for &#039;&lt;HOST&gt;:.*&#039; - Username/auth name mismatch
            .*NOTICE.* .*: Registration from &#039;.*&#039; failed for &#039;&lt;HOST&gt;:.*&#039; - Device does not match ACL
            .*NOTICE.* .*: Registration from &#039;.*&#039; failed for &#039;&lt;HOST&gt;:.*&#039; - Peer is not supposed to register
            .*NOTICE.* .*: Registration from &#039;.*&#039; failed for &#039;&lt;HOST&gt;:.*&#039; - ACL error (permit/deny)
            .*NOTICE.* .*: Registration from &#039;.*&#039; failed for &#039;&lt;HOST&gt;:.*&#039; - Device does not match ACL
            .*NOTICE.* .*: Registration from &#039;\&quot;.*\&quot;.*&#039; failed for &#039;&lt;HOST&gt;:.*&#039; - No matching peer found
            .*NOTICE.* .*: Registration from &#039;\&quot;.*\&quot;.*&#039; failed for &#039;&lt;HOST&gt;:.*&#039; - Wrong password
            .*NOTICE.* &lt;HOST&gt; failed to authenticate as &#039;.*&#039;$
            .*NOTICE.* .*: No registration for peer &#039;.*&#039; \(from &lt;HOST&gt;\)
            .*NOTICE.* .*: Host &lt;HOST&gt; failed MD5 authentication for &#039;.*&#039; (.*)
            .*NOTICE.* .*: Failed to authenticate user .*@&lt;HOST&gt;.*
            .*NOTICE.* .*: &lt;HOST&gt; failed to authenticate as &#039;.*&#039;
            .*NOTICE.* .*: &lt;HOST&gt; tried  to authenticate with nonexistent user &#039;.*&#039;
            .*VERBOSE.*SIP/&lt;HOST&gt;-.*Received incoming SIP connection from unknown peer
            .*NOTICE.* .*: Sending fake auth rejection for device.* \[IP: &lt;HOST&gt;:.*\]
ignoreregex =</code></pre></div><p>fail2ban не банит, в логах <br /></p><div class="codebox"><pre><code>[Sep  4 11:55:17] NOTICE[1289] chan_sip.c: Registration from &#039;&quot;xxxxxx&quot; &lt;sip:000000058@xxxxxx&gt;&#039; failed for &#039;xxxxxxx1120&#039; - Wrong password
[Sep  4 11:55:30] WARNING[8110][C-00002003] app_dial.c: Dial requires an argument (technology/resource)
[Sep  4 11:55:52] WARNING[8125][C-00002005] dsp.c: Inband DTMF is not supported on codec g729. Use RFC2833
[Sep  4 11:55:55] NOTICE[8186][C-00002009] chan_sip.c: Call to peer &#039;0000001594&#039; rejected due to usage limit of 1
[Sep  4 11:56:06] NOTICE[1289] chan_sip.c: Registration from &#039;&quot;xxxxxxx&quot; &lt;sip:000000058@xxxxxx&gt;&#039; failed for &#039;xxxxxxxx:1120&#039; - Wrong password
[Sep  4 11:56:14] NOTICE[8293][C-0000200b] chan_sip.c: Call to peer &#039;0000001594&#039; rejected due to usage limit of 1
[Sep  4 11:57:03] NOTICE[1289] chan_sip.c: Registration from &#039;&quot;xxxxx&quot; &lt;sip:000000058@xxxxxx&gt;&#039; failed for &#039;xxxxxx:1120&#039; - Wrong password
[Sep  4 11:57:30] WARNING[8500][C-0000201a] dsp.c: Inband DTMF is not supported on codec g729. Use RFC2833
[Sep  4 12:00:15] WARNING[8942][C-00002036] dsp.c: Inband DTMF is not supported on codec g729. Use RFC2833
[Sep  4 12:01:22] NOTICE[1289] chan_sip.c: Registration from &#039;&quot;xxxxxx&quot; &lt;sip:000000058@xxxxxxx&gt;&#039; failed for &#039;xxxxxxx:1120&#039; - Wrong password
[Sep  4 12:06:46] NOTICE[1289] chan_sip.c: Registration from &#039;&quot;xxxxxxx&quot; &lt;sip:000000058@xxxxxxx&gt;&#039; failed for &#039;xxxxxx:1120&#039; - Wrong password
[Sep  4 12:07:38] NOTICE[10614][C-00002089] chan_sip.c: Call to peer &#039;0000001482&#039; rejected due to usage limit of 1
[Sep  4 12:08:01] NOTICE[1289] chan_sip.c: Registration from &#039;&quot;xxxxx&quot; &lt;sip:000000058@xxxxxxx&gt;&#039; failed for &#039;xxxxxxxx:1120&#039; - Wrong password
[Sep  4 12:08:03] NOTICE[1289] chan_sip.c: Received SIP subscribe for peer without mailbox: 0000001082
[Sep  4 12:10:10] NOTICE[1289][C-00002096] chan_sip.c: Got OK on REFER Notify message
[Sep  4 12:13:31] ERROR[11772] utils.c: fwrite() returned error: Broken pipe
[Sep  4 12:13:36] NOTICE[11766][C-000020c6] chan_sip.c: Call to peer &#039;0000001273&#039; rejected due to usage limit of 1</code></pre></div><p>шесть попыток было, что не так настроил?</p>]]></description>
			<author><![CDATA[null@example.com (kom-pik)]]></author>
			<pubDate>Wed, 04 Sep 2013 12:58:42 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=361855#p361855</guid>
		</item>
	</channel>
</rss>
