<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Adding custom rule]]></title><description><![CDATA[<p dir="auto">I added the following to the cutom.rules:</p>
<p dir="auto">alert tcp $EXTERNAL_NET any -&gt; any 25 (msg:"SMTP AUTH LOGON brute force attempt"; content:"AUTH LOGIN"; nocase; classtype:suspicious-login; sid:1000001; rev:2;)</p>
<p dir="auto">alert tcp $SMTP_SERVERS 25 -&gt; $EXTERNAL_NET any (msg:"SMTP AUTH bruteforce attack"; content:"535 Incorrect authentication data."; nocase; classtype:attempted-user; threshold:type threshold, track by_src, count 2, seconds 60; sid:1000500; rev:6;)</p>
<p dir="auto">I am trying to alleviate the rash of auth failures spammers/bots are causing to our mail server.</p>
<p dir="auto">Once I added to teh cutom.rules the system validates it and reloads. Than I just sit and wait but I see nothing been blocked.... I look at my mail server logs and I still see: 535 Incorrect authentication data.</p>
<p dir="auto">Am I doing this wrong?</p>
<p dir="auto">TIA!</p>
]]></description><link>https://forum.netgate.com/topic/145828/adding-custom-rule</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Jul 2026 01:58:03 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/145828.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 18 Aug 2019 13:37:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Adding custom rule on Sun, 18 Aug 2019 18:39:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ffuentes">@<bdi>ffuentes</bdi></a> said in <a href="/post/859543">Adding custom rule</a>:</p>
<blockquote>
<p dir="auto">I added the following to the cutom.rules:</p>
<p dir="auto">alert tcp $EXTERNAL_NET any -&gt; any 25 (msg:"SMTP AUTH LOGON brute force attempt"; content:"AUTH LOGIN"; nocase; classtype:suspicious-login; sid:1000001; rev:2;)</p>
<p dir="auto">alert tcp $SMTP_SERVERS 25 -&gt; $EXTERNAL_NET any (msg:"SMTP AUTH bruteforce attack"; content:"535 Incorrect authentication data."; nocase; classtype:attempted-user; threshold:type threshold, track by_src, count 2, seconds 60; sid:1000500; rev:6;)</p>
<p dir="auto">I am trying to alleviate the rash of auth failures spammers/bots are causing to our mail server.</p>
<p dir="auto">Once I added to teh cutom.rules the system validates it and reloads. Than I just sit and wait but I see nothing been blocked.... I look at my mail server logs and I still see: 535 Incorrect authentication data.</p>
<p dir="auto">Am I doing this wrong?</p>
<p dir="auto">TIA!</p>
</blockquote>
<p dir="auto">If you are not seeing alerts for your custom rule, then that means it is written incorrectly. By that I don't mean a syntax error, but instead the conditions you specify in order to trigger the rule are not being detected. Here are some suggestions:</p>
<p dir="auto">Make sure that on the VARIABLES tab you have actually assigned a correct alias or IP address to the $SMTP_SERVERS variable. The best way to do this is create a firewall alias containing the correct IP address or addresses and then make sure that alias is defined for the SMTP_SERVERS variable on the VARIABLES tab for the Snort interface.</p>
<p dir="auto">You may also need to grab some packet captures to be sure you have the exact strings contained within your rules.</p>
<p dir="auto">Finally, the advice of <a class="plugin-mentions-user plugin-mentions-a" href="/user/nollipfsense">@<bdi>NollipfSense</bdi></a> only applies to you if you are running Suricata and using Inline IPS Mode, or only if you are running the Snort 4.0 package on pfSense-2.5 DEVEL and using the new Inline IPS Mode there. If you are using the Snort package on pfSense-2.4.4, then you do not change rule actions because there is no Inline IPS mode available.</p>
]]></description><link>https://forum.netgate.com/post/859587</link><guid isPermaLink="true">https://forum.netgate.com/post/859587</guid><dc:creator><![CDATA[bmeeks]]></dc:creator><pubDate>Sun, 18 Aug 2019 18:39:50 GMT</pubDate></item><item><title><![CDATA[Reply to Adding custom rule on Sun, 18 Aug 2019 13:45:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ffuentes">@<bdi>ffuentes</bdi></a> said in <a href="/post/859543">Adding custom rule</a>:</p>
<blockquote>
<p dir="auto">I added the following to the cutom.rules:</p>
<p dir="auto">alert tcp $EXTERNAL_NET any -&gt; any 25 (msg:"SMTP AUTH LOGON brute force attempt"; content:"AUTH LOGIN"; nocase; classtype:suspicious-login; sid:1000001; rev:2;)</p>
<p dir="auto">alert tcp $SMTP_SERVERS 25 -&gt; $EXTERNAL_NET any (msg:"SMTP AUTH bruteforce attack"; content:"535 Incorrect authentication data."; nocase; classtype:attempted-user; threshold:type threshold, track by_src, count 2, seconds 60; sid:1000500; rev:6;)</p>
<p dir="auto">I am trying to alleviate the rash of auth failures spammers/bots are causing to our mail server.</p>
<p dir="auto">Once I added to teh cutom.rules the system validates it and reloads. Than I just sit and wait but I see nothing been blocked.... I look at my mail server logs and I still see: 535 Incorrect authentication data.</p>
<p dir="auto">Am I doing this wrong?</p>
<p dir="auto">TIA!</p>
</blockquote>
<p dir="auto">You need to change the rule to drop...for example:</p>
<p dir="auto">Drop tcp $EXTERNAL_NET any -&gt; any 25 (msg:"SMTP AUTH LOGON brute force attempt"; content:"AUTH LOGIN"; nocase; classtype:suspicious-login; sid:1000001; rev:2;)</p>
]]></description><link>https://forum.netgate.com/post/859544</link><guid isPermaLink="true">https://forum.netgate.com/post/859544</guid><dc:creator><![CDATA[NollipfSense]]></dc:creator><pubDate>Sun, 18 Aug 2019 13:45:02 GMT</pubDate></item></channel></rss>