<?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[[Bug Report] Snort IDS/IPS Portscan Preprocessor Cannot Detect Any Port Scans in pfSense CE 2.9.0 Firewall]]></title><description><![CDATA[<p dir="auto">Subject: [Bug Report] Snort IDS/IPS Portscan Preprocessor Cannot Detect Any Port Scans in pfSense CE 2.9.0 Firewall</p>
<p dir="auto">Good day from Singapore,</p>
<p dir="auto">Reporter: Mr. Turritopsis Dohrnii Teo En Ming<br />
Date: 22 Sep 2026 Tuesday<br />
Country: Singapore</p>
<p dir="auto">I had activated Max-Detect IPS Policy with Portscan Detection enabled on 21 Sep 2026 Monday at 10.17 PM.</p>
<p dir="auto">This is what I have done.</p>
<ol>
<li>Configure WAN Snort as detection-only</li>
</ol>
<p dir="auto">Go to:</p>
<p dir="auto">Services → Snort → Snort Interfaces → WAN → WAN Settings</p>
<p dir="auto">Set:</p>
<p dir="auto">Enable: checked<br />
Interface: WAN<br />
Send Alerts to System Logs: checked if you want the alerts in /var/log/system.log<br />
Block Offenders: UNCHECKED<br />
If your version presents an Inline IPS option: UNCHECKED</p>
<p dir="auto">This is the critical part for your requirement of "without blocking anything." Netgate documents that Block Offenders causes Snort to insert<br />
firewall blocks for hosts generating alerts, while the default is disabled. Inline inspection is also separate and is not required for<br />
IDS-only monitoring.</p>
<p dir="auto">In other words, you can use the Max-Detect IPS policy without actually using Snort to block traffic. Here "IPS Policy" describes the rule policy;<br />
it does not by itself mean that pfSense must block matching traffic.</p>
<ol start="2">
<li>Use the Max-Detect policy</li>
</ol>
<p dir="auto">Go to:</p>
<p dir="auto">WAN Categories → Snort Subscriber IPS Policy Selection</p>
<p dir="auto">Set:</p>
<p dir="auto">Use IPS Policy:       ✓<br />
IPS Policy Selection: Max-Detect</p>
<p dir="auto">Then Save.</p>
<p dir="auto">Max-Detect is specifically intended to enable the broadest detection coverage. Snort describes Maximum Detection as including Security,<br />
Balanced and Connectivity policy rules plus additional active rules, with increased false-positive/performance costs.</p>
<p dir="auto">Your pfSense interface also exposes Max-Detect as an available policy, as shown in your screenshot. Netgate's current interface documentation<br />
describes Max-Detect as the policy intended to detect as much as possible.</p>
<p dir="auto">Don't manually select every Snort Subscriber category</p>
<p dir="auto">Once Use IPS Policy is enabled, let Max-Detect determine the Snort Subscriber rule selection. pfSense documentation says selecting a policy<br />
disables manual selection of those Snort categories.</p>
<p dir="auto">You can still have other rulesets such as Emerging Threats if you've configured them separately.</p>
<ol start="3">
<li>Enable the required preprocessors</li>
</ol>
<p dir="auto">This turned out to be particularly important on your installation.</p>
<p dir="auto">Go to:</p>
<p dir="auto">WAN Preprocs</p>
<p dir="auto">Keep the normal/default preprocessors enabled, and specifically make sure:</p>
<p dir="auto">Modbus preprocessor = ENABLED</p>
<p dir="auto">and:</p>
<p dir="auto">DNP3 preprocessor = ENABLED</p>
<p dir="auto">We discovered why this matters.</p>
<p dir="auto">Initially Max-Detect failed with:</p>
<p dir="auto">Unknown rule option: 'modbus_func'</p>
<p dir="auto">After you enabled Modbus, Snort proceeded further.</p>
<p dir="auto">It then failed on:</p>
<p dir="auto">Unknown rule option: 'dnp3_ind'</p>
<p dir="auto">After you enabled DNP3, you reported that Max-Detect finally started successfully.</p>
<p dir="auto">So on your installation I would leave both Modbus and DNP3 enabled while using Max-Detect.</p>
<p dir="auto">Do not disable them simply because you don't operate Modbus or DNP3 equipment. In this case their importance is that Max-Detect has<br />
enabled rules containing keywords implemented by those preprocessors.</p>
<ol start="4">
<li>Configure Portscan Detection</li>
</ol>
<p dir="auto">Still under:</p>
<p dir="auto">Services → Snort → Snort Interfaces → WAN → WAN Preprocs → Portscan Detection</p>
<p dir="auto">Use the settings you showed in your screenshot:</p>
<p dir="auto">Enable:          ✓<br />
Protocol:        all<br />
Scan Type:       all<br />
Sensitivity:     high<br />
Memory Cap:      10000000</p>
<p dir="auto">Ignore Scanners: [blank]<br />
Ignore Scanned:  [blank]</p>
<p dir="auto">Those are suitable for your test.</p>
<p dir="auto">With Protocol = all, sfPortscan monitors TCP, UDP, ICMP and IP scanning. With Scan Type = all, it covers portscans, portsweeps,<br />
decoy scans and distributed portscans. Snort's sfPortscan documentation confirms these options.</p>
<p dir="auto">Your previous startup log also proved that Snort generated:</p>
<p dir="auto">Portscan Detection Config:<br />
Detect Protocols: TCP UDP ICMP IP<br />
Detect Scan Type: portscan portsweep decoy_portscan distributed_portscan<br />
Sensitivity Level: High/Experimental</p>
<p dir="auto">So the GUI settings are making it into Snort correctly.</p>
<p dir="auto">Keep Ignore Scanners blank</p>
<p dir="auto">Your GUI says its default is $HOME_NET.</p>
<p dir="auto">That's appropriate for your particular test because your Nmap scanner is external in Tokyo, while the pfSense WAN being tested is in Singapore.</p>
<p dir="auto">Don't put your Tokyo scanner's public IP into Ignore Scanners, because that would explicitly tell sfPortscan not to alert on scans originating<br />
from it. Snort documents ignore_scanners as suppressing scan alerts for specified source addresses.</p>
<ol start="5">
<li>Make sure Stream5 remains enabled</li>
</ol>
<p dir="auto">This is important.</p>
<p dir="auto">Snort's own sfPortscan documentation states that Stream5 is required for sfPortscan, particularly to determine direction for connectionless<br />
protocols such as UDP.</p>
<p dir="auto">Your previous Snort startup log showed TCP and UDP session tracking active, so I would not change the Stream settings.</p>
<ol start="6">
<li>Save and perform a full Snort restart</li>
</ol>
<p dir="auto">After changing preprocessors, don't depend solely on a configuration reload.</p>
<p dir="auto">Stop WAN Snort and start it again from:</p>
<p dir="auto">Services → Snort → Snort Interfaces</p>
<p dir="auto">This is preferable because Snort documents that some dynamic preprocessor changes require a restart rather than merely a reload.</p>
<p dir="auto">Wait until the WAN Snort icon shows it is running.</p>
<p dir="auto">There is no need to reboot the entire pfSense firewall every time.</p>
<ol start="7">
<li>Confirm Max-Detect really loaded</li>
</ol>
<p dir="auto">Because you have system logging enabled, check:</p>
<p dir="auto">tail -100 /var/log/system.log</p>
<p dir="auto">You should not see:</p>
<p dir="auto">FATAL ERROR</p>
<p dir="auto">For a more direct check:</p>
<p dir="auto">grep -i "FATAL ERROR" /var/log/system.log</p>
<p dir="auto">And:</p>
<p dir="auto">ps auxww | grep '[s]nort'</p>
<p dir="auto">The important distinction is that the GUI configuration being saved does not necessarily prove Snort successfully loaded the entire Max-Detect<br />
ruleset. The running Snort process does.</p>
<ol start="8">
<li>Verify the generated preprocessors</li>
</ol>
<p dir="auto">For Modbus:</p>
<p dir="auto">grep -n -i 'preprocessor.*modbus' /usr/local/etc/snort/snort_44907_igc0/snort.conf</p>
<p dir="auto">For DNP3:</p>
<p dir="auto">grep -n -i 'preprocessor.*dnp3' /usr/local/etc/snort/snort_44907_igc0/snort.conf</p>
<p dir="auto">For sfPortscan:</p>
<p dir="auto">grep -n -i 'sfportscan' /usr/local/etc/snort/snort_44907_igc0/snort.conf</p>
<p dir="auto">Do not manually edit this generated snort.conf. Use these commands only to verify what pfSense generated.</p>
<ol start="9">
<li>Test from Tokyo</li>
</ol>
<p dir="auto">For a straightforward TCP SYN portscan test from your Tokyo system:</p>
<p dir="auto">sudo nmap -Pn -sS -p 1-10000 -vvv &lt;your-Singapore-public-IP&gt;</p>
<p dir="auto">You can also deliberately slow or speed the scan later, but first use a conventional scan so we're testing the basic configuration.</p>
<p dir="auto">On pfSense:</p>
<p dir="auto">tail -f /var/log/system.log</p>
<p dir="auto">Then perform the scan.</p>
<p dir="auto">You can subsequently search:</p>
<p dir="auto">grep -i "portscan" /var/log/system.log</p>
<p dir="auto">and:</p>
<p dir="auto">grep -i "scan" /var/log/system.log | tail -100</p>
<p dir="auto">Also check:</p>
<p dir="auto">Services → Snort → Alerts</p>
<ol start="10">
<li>Your Nmap signature detection is already proven to work</li>
</ol>
<p dir="auto">This part is important because it separates the remaining sfPortscan question from the rest of Snort.</p>
<p dir="auto">Your previous log already contained repeated alerts such as:</p>
<p dir="auto">ET SCAN NMAP OS Detection Probe</p>
<p dir="auto">and:</p>
<p dir="auto">ET SCAN Potential SSH Scan</p>
<p dir="auto">from your external scanner to the Singapore WAN.</p>
<p dir="auto">Therefore Snort is seeing the Nmap traffic and ordinary Snort scan signatures are detecting it.</p>
<p dir="auto">The outstanding question is narrower: why the sfPortscan preprocessor itself isn't producing the expected portscan event.</p>
<ol start="11">
<li>Make absolutely sure Snort cannot block anything</li>
</ol>
<p dir="auto">For the configuration you want, I would use:</p>
<pre><code>                WAN Snort
                   │
         ┌─────────┴──────────┐
         │                    │
    Max-Detect           Preprocessors
         │                    │
  Lots of rules       sfPortscan = ON
                      Modbus = ON
                      DNP3 = ON
         │                    │
         └─────────┬──────────┘
                   │
                ALERT
                   │
             system.log
                   │
                   ▼
           No Snort blocking
</code></pre>
<p dir="auto">The key WAN Settings should therefore be:</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Setting</th>
<th>Your configuration</th>
</tr>
</thead>
<tbody>
<tr>
<td>Snort</td>
<td><strong>Enabled</strong></td>
</tr>
<tr>
<td>IPS Policy</td>
<td><strong>Max-Detect</strong></td>
</tr>
<tr>
<td>Portscan Detection</td>
<td><strong>Enabled</strong></td>
</tr>
<tr>
<td>Protocol</td>
<td><strong>All</strong></td>
</tr>
<tr>
<td>Scan Type</td>
<td><strong>All</strong></td>
</tr>
<tr>
<td>Sensitivity</td>
<td><strong>High</strong></td>
</tr>
<tr>
<td>Modbus preprocessor</td>
<td><strong>Enabled</strong></td>
</tr>
<tr>
<td>DNP3 preprocessor</td>
<td><strong>Enabled</strong></td>
</tr>
<tr>
<td>Send alerts to system log</td>
<td><strong>Enabled</strong></td>
</tr>
<tr>
<td><strong>Block Offenders</strong></td>
<td><strong>Disabled</strong></td>
</tr>
<tr>
<td><strong>Inline IPS</strong></td>
<td><strong>Disabled</strong>, if presented</td>
</tr>
<tr>
<td>Ignore Scanners</td>
<td><strong>Blank/default</strong></td>
</tr>
<tr>
<td>Ignore Scanned</td>
<td><strong>Blank</strong></td>
</tr>
</tbody>
</table>
<p dir="auto">Netgate specifically recommends starting Snort with blocking disabled because more aggressive policies can generate false positives.</p>
<p dir="auto">One caution about Max-Detect</p>
<p dir="auto">Max-Detect is deliberately aggressive. Snort says Maximum Detection is primarily intended for testing and isn't optimized for performance;<br />
false positives are expected.</p>
<p dir="auto">That actually fits what you're trying to do if your objective is maximum visibility rather than blocking. Leaving blocking off means you can<br />
observe what Max-Detect finds without Snort automatically cutting off hosts.</p>
<p dir="auto">And based on what we've already discovered on your firewall, I would not enable every remaining preprocessor indiscriminately. Modbus and DNP3<br />
were specifically demonstrated to be required by rules Max-Detect selected. If Snort now starts cleanly with Max-Detect, leave the other<br />
preprocessor settings alone unless another rule dependency or your traffic requires them.</p>
<p dir="auto">===================================================================================================================================</p>
<p dir="auto">Important Information:</p>
<p dir="auto">pfSense CE firewall version: 2.9.0</p>
<p dir="auto">Snort package version: 4.1.10</p>
<p dir="auto">Snort version: 2.9.20_9</p>
<p dir="auto">===================================================================================================================================</p>
<p dir="auto">My Snort signatures/rules have already been proven to work. When I run nmap scans from Tokyo against my pfSense WAN interface in Singapore,<br />
many of the following Snort alerts were generated:</p>
<p dir="auto">ET SCAN NMAP OS Detection Probe</p>
<p dir="auto">ET SCAN Potential SSH Scan</p>
<p dir="auto">However, port scan detection simply don't work. I think it is a bug.</p>
<p dir="auto">Please help me to get it working.</p>
<p dir="auto">Thank you.</p>
<p dir="auto">Regards,</p>
<p dir="auto">Mr. Turritopsis Dohrnii Teo En Ming<br />
Singapore<br />
22 Sep 2026 Tuesday 12.26 pm Singapore Time</p>
]]></description><link>https://forum.netgate.com/topic/201425/bug-report-snort-ids-ips-portscan-preprocessor-cannot-detect-any-port-scans-in-pfsense-ce-2.9.0-firewall</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Nov 2026 20:34:28 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/201425.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 22 Sep 2026 06:34:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Bug Report] Snort IDS/IPS Portscan Preprocessor Cannot Detect Any Port Scans in pfSense CE 2.9.0 Firewall on Tue, 22 Sep 2026 11:47:36 GMT]]></title><description><![CDATA[<p dir="auto">Subject: Additional troubleshooting / possible root cause found for Snort Portscan Detection preprocessor not generating portscan alerts</p>
<p dir="auto">Good day from Singapore,</p>
<p dir="auto">Reporter: Mr. Turritopsis Dohrnii Teo En Ming<br />
Date: 22 Sep 2026 Tuesday 7.15 pm<br />
Country: Singapore</p>
<p dir="auto">I performed further testing on pfSense CE 2.9.0 with Snort package 4.1.10 / Snort 2.9.20_9.</p>
<p dir="auto">The sfPortscan preprocessor itself is correctly generated in the WAN snort.conf:</p>
<p dir="auto">preprocessor sfportscan: <br />
scan_type { all } <br />
proto { all } <br />
memcap { 10000000 } <br />
sense_level { high } <br />
ignore_scanners { $HOME_NET }</p>
<p dir="auto">Stream5 is also enabled:</p>
<p dir="auto">track_tcp yes<br />
track_udp yes</p>
<p dir="auto">The generated file:</p>
<p dir="auto">preproc_rules/preprocessor.rules</p>
<p dir="auto">contains the sfPortscan GID 122 rules, including:</p>
<p dir="auto">gid: 122; sid: 1   PSNG_TCP_PORTSCAN<br />
gid: 122; sid: 5   PSNG_TCP_FILTERED_PORTSCAN<br />
gid: 122; sid: 21  PSNG_UDP_FILTERED_PORTSCAN</p>
<p dir="auto">However, the generated snort.conf does not define PREPROC_RULE_PATH, does not include preprocessor.rules, and does not contain config autogenerate_preprocessor_decoder_rules.</p>
<p dir="auto">The normal rule includes are only:</p>
<p dir="auto">include $RULE_PATH/snort.rules<br />
include $RULE_PATH/flowbit-required.rules<br />
include $RULE_PATH/custom.rules</p>
<p dir="auto">I also checked those three included rule files for gid: 122, and none contained any GID 122 rules.</p>
<p dir="auto">Controlled test</p>
<p dir="auto">I created a test configuration and added:</p>
<p dir="auto">var PREPROC_RULE_PATH preproc_rules</p>
<p dir="auto">and:</p>
<p dir="auto">include $PREPROC_RULE_PATH/preprocessor.rules</p>
<p dir="auto">snort -T then successfully validated the configuration:</p>
<p dir="auto">Snort successfully validated the configuration!<br />
Snort exiting</p>
<p dir="auto">I then stopped only the WAN Snort process, added the same two lines to the generated WAN snort.conf, and started Snort directly using the same command line normally used by pfSense,<br />
so that pfSense would not regenerate snort.conf.</p>
<p dir="auto">/usr/local/bin/snort -R _44907 -M -D --daq pcap --daq-mode passive --treat-drop-as-alert -l /var/log/snort/snort_igc044907 --pid-path /var/run --nolock-pidfile --no-interface-pidfile -G 44907 <br />
-c /usr/local/etc/snort/snort_44907_igc0/snort.conf -i igc0</p>
<p dir="auto">After doing this, sfPortscan immediately started generating GID 122 alerts from external scans. Examples:</p>
<p dir="auto">[122:21:1] (portscan) UDP Filtered Portscan<br />
[122:5:1] (portscan) TCP Filtered Portscan</p>
<p dir="auto">The same external scanner that previously generated normal Snort Nmap signature alerts but no sfPortscan alerts then generated:</p>
<p dir="auto">[122:21:1] (portscan) UDP Filtered Portscan</p>
<p dir="auto">Therefore, my testing suggests that sfPortscan itself is functioning, but its GID 122 rules in preproc_rules/preprocessor.rules are not being loaded by the pfSense-generated Snort configuration.</p>
<p dir="auto">Another observation is that starting Snort normally from the pfSense GUI regenerates snort.conf and removes the manually added PREPROC_RULE_PATH and include $PREPROC_RULE_PATH/preprocessor.rules lines,<br />
after which the workaround is lost.</p>
<p dir="auto">I reproduced the original failure with both Max-Detect and Security IPS policies, so the problem does not appear to be specific to Max-Detect.</p>
<p dir="auto">Could the Snort package maintainer please check whether preprocessor.rules should be included/processed when generating the interface snort.conf?</p>
<p dir="auto">Ordinary Snort Nmap signatures were working before the workaround. That proves the failure wasn't caused by traffic failing to reach Snort. For example, I had ET SCAN NMAP OS Detection Probe alerts<br />
while GID 122 remained completely absent.</p>
<p dir="auto">My experiment demonstrates that loading preprocessor.rules restores GID 122 alerts; the package maintainer can determine why the generated Snort configuration isn't loading/processing those rules and what the<br />
correct permanent fix should be.</p>
<p dir="auto">Thank you very much.</p>
<p dir="auto">Regards,</p>
<p dir="auto">Mr. Turritopsis Dohrnii Teo En Ming<br />
Republic of Singapore<br />
22 Sep 2026 Tuesday 7.34 pm Singapore Time</p>
]]></description><link>https://forum.netgate.com/post/1249240</link><guid isPermaLink="true">https://forum.netgate.com/post/1249240</guid><dc:creator><![CDATA[Teo En Ming]]></dc:creator><pubDate>Tue, 22 Sep 2026 11:47:36 GMT</pubDate></item></channel></rss>