Configuring the Snort Package — pfSense Documentation (2024)

Snort is an intrusion detection and prevention system. It can be configured tosimply log detected network events to both log and block them. Thanks toOpenAppID detectors and rules, Snort package enables applicationdetection and filtering. The package is available to install in the pfSense®webGUI from System > Package Manager. Snort operates using detectionsignatures called rules. Snort rules can be custom created by the user, or anyof several pre-packaged rule sets can be enabled and downloaded.

The Snort package currently offers support for these pre-packaged rules:

  • Snort VRT (Vulnerability Research Team) rules

  • Snort GPLv2 Community Rules

  • Emerging Threats Open Rules

  • Emerging Threats Pro Rules

  • OpenAppID Open detectors and rules for application detection

The Snort GPLv2 Community Rules and the Emerging Threats Open Rules areboth available for free with no registration required. The Snort VRTrules are offered in two forms. One is a registered-user version whichis free, but requires registration at http://www.snort.org. Theregistered-user free version only provides access to rules that are30-days old or more in age. A Snort VRT paid subscription can bepurchased, and it offers twice-weekly (and sometimes more frequent)updates to the rules. The Emerging Threats Pro rules are offered to paidsubscribers only and offer almost daily updates to address fast-changingthreats.

We strongly suggest obtaining a paid subscription from Snort or EmergingThreats in order to download the most current rules. This is highlyrecommended for commercial applications.

Launching Snort configuration GUI

To launch the Snort configuration application, navigate to Services >Snort from the menu in the pfSense webGUI.

Configuring the Snort Package — pfSense Documentation (1)

Setting up Snort package for the first time

Click the Global Settings tab and enable the rule set downloads touse. If either the Snort VRT or the Emerging Threats Pro rules arechecked, a text box will be displayed to enter the unique subscribercode obtained with the subscription or registration.

More than one rule set may be enabled for download, but note thefollowing caveats. If a paid subscription is available for the Snort VRTrules, then all of the Snort GPLv2 Community rules are automaticallyincluded within the file downloaded with the Snort VRT rules; therefore,do not enable the GPLv2 Community rules if a paid-subscriber account isused for the Snort VRT rules. All of the Emerging Threats Open rules areincluded within the paid subscription for the Emerging Threats Prorules. If the Emerging Threats Pro rules are enabled, the EmergingThreats Open rules are automatically disabled.

Configuring the Snort Package — pfSense Documentation (2)

Once the desired rule sets are enabled, next set the interval for Snortto check for updates to the enabled rule packages. Use the UpdateInterval drop-down selector to choose a rule update interval. In mostcases every 12 hours is a good choice. The update start time may becustomized if desired. Enter the time as hours and minutes in 24-hourtime format. The default start time is 3 minutes past midnight localtime. So with a 12-hour update interval selected, Snort will check theSnort VRT or Emerging Threats web sites at 3 minutes past midnight and 3minutes past noon each day for any posted rule package updates.

Configuring the Snort Package — pfSense Documentation (3)

Update the rules

The Updates tab is used to check the status of downloaded rulespackages and to download new updates. The table shows the available rulepackages and their current status (not enabled, not downloaded, or avalid MD5 checksum and date).

Click on the Update Rules button to download the latest rule packageupdates. If there is a newer set of packaged rules on the vendor website, it will be downloaded and installed. The determination is made bycomparing the MD5 of the local file with that of the remote file on thevendor web site. If there is a mismatch, a new file is downloaded. TheFORCE button can be used to force download of the rule packages fromthe vendor web site no matter how the MD5 hash tests out.

In the screenshot below, the Snort VRT and Emerging Threats Open rulepackages have been successfully downloaded. The calculated MD5 hash andthe file download date and time are shown. Also note the last updatetime and result are shown in the center of the page.

Configuring the Snort Package — pfSense Documentation (4)

Add Snort to an interface

Click the Snort Interfaces tab and then the Configuring the Snort Package — pfSense Documentation (5) icon to add a newSnort interface.

Configuring the Snort Package — pfSense Documentation (6)

A new Interface Settings tab will open with the next available interfaceautomatically selected. The interface selection may be changed using theInterface drop-down if desired. A descriptive name may also beprovided for the interface. Other interface parameters may also be seton this page. Be sure to click the SAVE button down at the bottom ofthe page when finished.

Configuring the Snort Package — pfSense Documentation (7)

After saving, the browser will be returned to the Snort Interfacestab. Note the warning icons in the image below showing no rules havebeen selected for the new Snort interface. Those rules will beconfigured next. Click the Configuring the Snort Package — pfSense Documentation (8) icon (shown highlighted with a red box inthe image below) to edit the new Snort interface again.

Configuring the Snort Package — pfSense Documentation (9)

Select which types of rules will protect the network

Click the Categories tab for the new interface.

If a Snort VRT Oinkmaster code was obtained (either free registered useror the paid subscription), enabled the Snort VRT rules, and entered theOinkmaster code on the Global Settings tab then the option of choosingfrom among three pre-configured IPS policies is available. These greatlysimplify the process of choosing enforcing rules for Snort to use wheninspecting traffic. The IPS policies are only available when the SnortVRT rules are enabled.

The three Snort VRT IPS Policies are: (1) Connectivity, (2) Balanced and(3) Security. These are listed in order of increasing security. However,resist the temptation to immediately jump to the most secure Securitypolicy if Snort is unfamiliar. False positives can frequently occur withthe more secure policies, and careful tuning by an experiencedadministrator may be required.

Tip

If Snort is unfamiliar, then using the less restrictiveConnectivity policy in non-blocking mode (the default setting) isrecommended as a starting point so that you can whitelist falsepositives. Once experience with Snort has been gained in this networkenvironment, blocking mode may be enabled (via the Block Offendersoption in the Snort Interface Settings tab) and a more restrictiveIPS policy may be chosen.

Configuring the Snort Package — pfSense Documentation (10)

If the Snort VRT rules were not enabled, or if any of the other rulepackages are to be used, then make the rule category selections bychecking the checkboxes beside the rule categories to use.

Configuring the Snort Package — pfSense Documentation (11)

Be sure to click SAVE when finished to save the selection and buildthe rules file for Snort to use.

Starting Snort on an interface

Click the Snort Interfaces tab to display the configured Snort interfaces.Click the Configuring the Snort Package — pfSense Documentation (12) icon (shown highlighted with a red box in the imagebelow) to start Snort on an interface.

Configuring the Snort Package — pfSense Documentation (13)

It will take several seconds for Snort to start. Once it has started, the iconwill change to Configuring the Snort Package — pfSense Documentation (14) as shown below. To stop a running Snortinstance on an interface, click the Configuring the Snort Package — pfSense Documentation (15) icon.

Configuring the Snort Package — pfSense Documentation (16)

Select which types of signatures will protect the network

Click the Rules tab for the interface to configure individual rulesin the enabled categories. Generally this page is only used to disableparticular rules that may be generating too many false positives in aparticular network environment. Be sure they are in fact truly falsepositives before taking the step of disabling a Snort rule!

Select a rules category from the Category drop-down to view all the assignedrules. Click the Configuring the Snort Package — pfSense Documentation (17) or Configuring the Snort Package — pfSense Documentation (18) icon at the far-leftof a row to toggle the rule’s state from enabled to disabled, or clickConfiguring the Snort Package — pfSense Documentation (19) or Configuring the Snort Package — pfSense Documentation (20) to toggle from disabled to enabled. Theicon will change to indicate the state of the rule. At the top of the rule listis a legend showing the icons used to indicate the current state of a rule.

Configuring the Snort Package — pfSense Documentation (21)Configuring the Snort Package — pfSense Documentation (22)

Define servers to protect and improve performance

Configuring the Snort Package — pfSense Documentation (23)

Managing blocked hosts

The Blocked tab shows what hosts are currently being blocked bySnort (when the block offenders option is selected on the InterfaceSettings tab). Blocked hosts can be automatically cleared by Snort atone of several pre-defined intervals. The blocking options for aninterface are configured on the Snort Interface Settings tab for theinterface.

Configuring the Snort Package — pfSense Documentation (24)

Managing Pass lists

Pass Lists are lists of IP addresses that Snort should never block.These may be created and managed on the Pass Lists tab. When an IPaddress is listed on a Pass List, Snort will never insert a block onthat address even when malicious traffic is detected.

To create a new Pass List, click Configuring the Snort Package — pfSense Documentation (25). To edit an existing Pass List,click the Configuring the Snort Package — pfSense Documentation (26). To delete a Pass List, click Configuring the Snort Package — pfSense Documentation (27). Note that a Pass Listmay not be deleted if it is currently assigned to one or more Snortinterfaces.

Configuring the Snort Package — pfSense Documentation (28)

A default Pass List is automatically generated by Snort for everyinterface, and this default list is used when no other list isspecified. Pass Lists are assigned to an interface on the InterfaceSettings tab.

Customized Pass List may be created and assigned to an interface. Thismight be done when trusted external hosts exist that are not located onnetworks directly connected to the firewall. To add external hosts inthis manner, first create an Alias under Firewall > Aliases and thenassign that alias to the Assigned Aliases field. In the exampleshown below, the alias “Friendly_ext_hosts” has been assigned. Thisalias would contain the IP addresses of the trusted external hosts.

When creating a custom Pass List, leave all the auto-generated IPaddresses checked in the Add auto-generated IP addresses section.Not selecting the checkboxes in this section can lead to blocking ofcritical addresses including the firewall interfaces themselves. Thiscould result in being locked out of the firewall over the network! Onlyuncheck boxes in this section when absolutely necessary.

Configuring the Snort Package — pfSense Documentation (29)

Click the ALIASES button to open a window showing previously definedaliases for selection. Remember to click SAVE to save changes.

Note

Remember that simply creating a Pass List is only the firststep! It must be selected by going to the Interface Settings tab forthe Snort interface and assigning the newly created Pass List as shownbelow. After assigning and saving the new Pass List, restart Snort onthe affected interface to pick up the change.

Configuring the Snort Package — pfSense Documentation (30)

Alert Thresholding and Suppression

Suppression Lists allow control over the alerts generated by Snortrules. When an alert is suppressed, then Snort no longer logs an alertentry (or blocks the IP address if block offenders is enabled) when aparticular rule fires. Snort still inspects all network traffic againstthe rule, but even when traffic matches the rule signature, no alertwill be generated. This is different from disabling a rule. When a ruleis disabled, Snort no longer tries to match it to any network traffic.Suppressing a rule might be done in lieu of disabling the rule whenalerts should only be stopped based on either the source or destinationIP. For example, to suppress the alert when traffic from a particulartrusted IP address is the source. If any other IP is the source ordestination of the traffic, the rule would still fire. To eliminate allalerts from the rule, then it is more efficient to simply disable therule rather than to suppress it. Disabling the rule will remove it fromSnort’s list of match rules and therefore makes for less work Snort hasto do.

Configuring the Snort Package — pfSense Documentation (31)

On the Suppress List Edit page, a new suppress list entry may bemanually added or edited. It is usually easier and faster to addsuppress list entries by clicking Configuring the Snort Package — pfSense Documentation (32) shown with the alert entries onthe Alerts tab. Remember to click the SAVE button to savechanges when manually editing Suppress List entries.

Configuring the Snort Package — pfSense Documentation (33)

Getting to know the alerts

The Alerts tab is where alerts generated by Snort are viewed. IfSnort is running on more than one interface, choose the interface whosealerts should be viewed in the drop-down selector.

Use the DOWNLOAD button to download a gzip tar file containing allof the logged alerts to a local machine. The CLEAR button is used toerase the current alerts log. Destination IP’s have been redacted fromthe screenshot.

Configuring the Snort Package — pfSense Documentation (34)

Alert Details

Configuring the Snort Package — pfSense Documentation (35)

The Date column shows the date and time the alert was generated. Theremaining columns show data from the rule that generated the alert.

In the Source, Destination columns are Configuring the Snort Package — pfSense Documentation (36) icons for performingreverse DNS lookups on the IP addresses as well as a Configuring the Snort Package — pfSense Documentation (37) icon used to addan automatic Suppress List entry for thealert using the IP address and SID (signature ID). This will prevent futurealerts from being generated by the rule for that specific IP address only. Ifeither of the Source or Destination addresses are currently being blocked bySnort, then a Configuring the Snort Package — pfSense Documentation (38) icon will also be shown. Clicking that icon will removethe block for the IP address.

The SID column contains two icons. The Configuring the Snort Package — pfSense Documentation (39) icon willautomatically add that SID to the SuppressList for theinterface and suppress future alerts from the signature for all IPaddresses. The Configuring the Snort Package — pfSense Documentation (40) icon in the SID column will disable therule and remove it from the enforcing rule set. When a rule is manuallydisabled, the icon in the SID column changes to Configuring the Snort Package — pfSense Documentation (41).

Application ID detection with OpenApp ID

OpenAppID is an application-layer network security plugin for the opensource intrusion detection system Snort. Learn more about ithere.

Enabling OpenAppID and its rules is done from Snort Global Settings.Select both checkboxes to enable detectors and rules download. Save thepage.

Configuring the Snort Package — pfSense Documentation (42)

After enabling the detectors and rules go to Snort Updates tab and clickon Update Rules. Wait for all the rules to update. Once done, thepage will show OpenAppID detectors and rules have been updated.

Configuring the Snort Package — pfSense Documentation (43)

The following steps assume you have already added Snort interface toyour LAN interface. Edit the LAN interface and navigate to LANcategories tab. When there, make sure the Snort OPENAPPID Rules fromthe right column are all selected and click Save.

Configuring the Snort Package — pfSense Documentation (44)

Lastly, while still editing Snort interface, navigate to LANPreprocessor tab.

Configuring the Snort Package — pfSense Documentation (45)

Scroll down to Application ID Detection section and select bothEnable and AppID Stats Logging checkboxes. Save the page theOpenApp ID will be activated on the Snort interface.

Configuring the Snort Package — pfSense Documentation (46)

Viewing detected applications can be done from Alerts tab. Thefollowing screenshots are examples of identified services andapplications:

Facebook

Configuring the Snort Package — pfSense Documentation (47)

Netflix

Configuring the Snort Package — pfSense Documentation (48)

Reddit

Configuring the Snort Package — pfSense Documentation (49)

Amazon Web Services

Configuring the Snort Package — pfSense Documentation (50)

iCloud

Configuring the Snort Package — pfSense Documentation (51)

Twitter

Configuring the Snort Package — pfSense Documentation (52)

Known issues

See also

You can find a list of known issues with this package on thepfSense bug tracker.

Package Support

This package is currently supported by Netgate Global Support to those with an activesupport subscription.

Configuring the Snort Package — pfSense Documentation (2024)
Top Articles
Latest Posts
Article information

Author: Foster Heidenreich CPA

Last Updated:

Views: 5257

Rating: 4.6 / 5 (56 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Foster Heidenreich CPA

Birthday: 1995-01-14

Address: 55021 Usha Garden, North Larisa, DE 19209

Phone: +6812240846623

Job: Corporate Healthcare Strategist

Hobby: Singing, Listening to music, Rafting, LARPing, Gardening, Quilting, Rappelling

Introduction: My name is Foster Heidenreich CPA, I am a delightful, quaint, glorious, quaint, faithful, enchanting, fine person who loves writing and wants to share my knowledge and understanding with you.