Snort & PPPoE: Snort refuses to start(?)
-
You are running version 2.0.3 of pfSense.
There should be a directory /usr/local/etc/snort/your_snort_sensor and in that directory should be snort.conf
I would like to see the contents of that file.Also would you do in the shell:
snort -T -i your_pppoe_interface -c /usr/local/etc/snort/your_snort_sensor/snort.conf
This is a test to run your configuration file. The last two lines should look like:
Snort successfully validated the configuration! Snort exiting
Or else you can look for irregularities.
Again thank you, Gogol ;D
I tried to find what you want to see. The "your_snort_sensor" invokes me to guess what you mean ( :P). I found two directories:
/usr/local/etc/snort/snort_64222_em0/ /usr/local/etc/snort/snort_64222_pppoe0/
I take it these are the 'sensor directories', and you wanted to see the last directories snort.conf. I have attached it.
The test command did give an error, I have attached the output of that also.
Thank you again Gogol ;D
-
@Hollander:
I take it these are the 'sensor directories', and you wanted to see the last directories snort.conf. I have attached it.
The test command did give an error, I have attached the output of that also.
Thank you again Gogol ;D
Here is your problem:
+++++++++++++++++++++++++++++++++++++++++++++++++++ Initializing rule chains... ERROR: /usr/local/etc/snort/snort_64222_pppoe0/rules/snort.rules(1821) Unknown rule option: 'dce_iface'. Fatal Error, Quitting.. [2.0.3-RELEASE][admin@pfsense.localdomain]/root(2):
This means you have no Preprocessors enabled, but you have enabled rules that need certain Preprocessors in order to function. I made a post some time back that most users should enable pretty much all the Preprocessors to keep from shooting themselves in the foot. You need to go to the Preprocessors tab in Snort and check all the boxes in the "General" section EXCEPT for "Sensitive Data". I suggest leaving that one disabled.
Another alternative on the same tab, but it reduces the effectiveness of Snort, is to check the box that says "Auto-Rule Disable" up near to top. That will automatically disable rules that need Preprocessors you do not have enabled. However, this automatic rule disabling can leave your systems less than adquately protected. It's there, though, for situations like this where the user does not want to have to sort out which Preprocessors are required for certain rules.
Bill
-
And while I am still on the Preprocessor soapbox –- ;)
Be aware that you must be intimately familiar with all the Preprocessors and their rule dependencies if you try to pick and choose which ones to enable. Also you must understand that on any given update of the Rules from Snort.org or Emerging Threats, formerly disabled rules could become enabled again and thus cause Snort not to restart following the update due to a Preprocessor dependency.
It's just better in my view, with today's higher-powered CPUs and firewalls with plenty of RAM, to just enable all the Preprocessors. That way, they are ready for any rule that needs them, and you don't get these FATAL ERRORS on restart because of a disabled Preprocessor. The only exception I make to this is the Sensitive Data preprocessor. Some folks don't want all the noise it can generate, so they disable it. The Snort package will, if the Sensitive Data Preprocessor is disabled, automatically take care of the handful of Preprocessor Rules associated with it.
Bill
-
Well snort can be patched to skip such rules also.
I am not sure why the snort guy made this a fatal error rather than a soft error.
Just skip the rule shouild be normal and warn the user about it!!!Maybe it would be something to look at on patching snort wiht this.
Its better to have a warning and snort running rather than no snort at all and just some cryptic error. -
Exactly!
-
Well, I can sort of see the point from the Sourcefire guys' point of view. The preprocessors are necessary for many, many rules to function properly. If Snort just auto-magically ignored such potentially critical configuration errors, users would be blindly unaware that some portion of their rear end was hanging out there exposed… ;D (if you get my drift). If Snort just started up, who among us will swear to always look at the log file just to see if there were any warnings? ... ;)
My view is there is no harm in enabling all the preprocessors. This way you don't get surprised. In fact, with the latest update to the Snort Package, I made the default condition "enabled" for most of the preprocessors. The exceptions were the port scan, sensitive data, and SCADA preprocessors. Unless you run a really frugal box, I don't think there is much overhead in having the extra preprocessors enabled.
What happened in the OP's case is that the new defaults I set only get used on a new Snort install with no previous saved settings. I made sure the code respected any previous settings. That can still bite folks who don't understand how Snort's rules engine and the preprocessors interact.
If you want a taste of what could happen automatically behind your back with hidden auto-disable logic, run the following test. Enable the Snort IPS-Security policy and then choose all the Emerging Threats Rules. You can even throw in Snort GPLv2 if you want. Make sure your box has at least 4 GB of RAM, though, before you try this test. After selecting all these rules, go to the Preprocessors tab and uncheck all the preprocessors, click the Auto-Rule Disable checkbox, and then click Save to regenerate the enforcing rules file. You should see the new View button appear where you can see the disabled rules. Click that button and have a look at all the Alerts you would not see if Snort automatically ignored or fixed preprocessor dependency errors for you without telling you.
The number from my test is 15,595 rules auto-disabled from the text rules, and then 50 of the required flowbit-dependent rules were also auto-disabled. The vast majority of these were from the HTTP_INSPECT preprocessor being disabled, but there are still quite a few tied to the other preprocessors. So the net result is 15,645 rules I thought I was using actually would get disabled behind my back if Snort did this by default.
Bill
-
@ermal:
Well snort can be patched to skip such rules also.
I am not sure why the snort guy made this a fatal error rather than a soft error.
Just skip the rule shouild be normal and warn the user about it!!!Maybe it would be something to look at on patching snort wiht this.
Its better to have a warning and snort running rather than no snort at all and just some cryptic error.But then people might think that Snort is protecting their system.
I agree with Bill to enable by default most preprocessors. People can always disable them and you have to suppose that they know what they are doing. ;)Furthermore:
Here is your problem:
Code:
+++++++++++++++++++++++++++++++++++++++++++++++++++
Initializing rule chains…
ERROR: /usr/local/etc/snort/snort_64222_pppoe0/rules/snort.rules(1821) Unknown rule option: 'dce_iface'.
Fatal Error, Quitting..
[2.0.3-RELEASE][admin@pfsense.localdomain]/root(2):Bill is soooooo fast!
-
Here is your problem:
+++++++++++++++++++++++++++++++++++++++++++++++++++ Initializing rule chains... ERROR: /usr/local/etc/snort/snort_64222_pppoe0/rules/snort.rules(1821) Unknown rule option: 'dce_iface'. Fatal Error, Quitting.. [2.0.3-RELEASE][admin@pfsense.localdomain]/root(2):
This means you have no Preprocessors enabled, but you have enabled rules that need certain Preprocessors in order to function. I made a post some time back that most users should enable pretty much all the Preprocessors to keep from shooting themselves in the foot. You need to go to the Preprocessors tab in Snort and check all the boxes in the "General" section EXCEPT for "Sensitive Data". I suggest leaving that one disabled.
Another alternative on the same tab, but it reduces the effectiveness of Snort, is to check the box that says "Auto-Rule Disable" up near to top. That will automatically disable rules that need Preprocessors you do not have enabled. However, this automatic rule disabling can leave your systems less than adquately protected. It's there, though, for situations like this where the user does not want to have to sort out which Preprocessors are required for certain rules.
Bill
Thank you very, very, very much Bill; this appeared to be the problem; all is working well again. Thank you for helping me ;D
-
@Hollander:
Thank you very, very, very much Bill; this appeared to be the problem; all is working well again. Thank you for helping me ;D
You are welcome. The next Snort package that comes out will have some better "default behaviors" baked in with regards to these pesky preprocessors – at least on new, green-field installs. For users with saved Snort settings that already had preprocessors explicitly disabled, they will still need to turn them on manually.
Bill
-
Greetings, I hope you're all well. I registered to address that I have the same issue, however I don't use PPPoE and also have all the preprocessors ticked except the Sensitive Data box.
The issue began after I re-installed the package to allow an update to 2.9.4.1 pkg v. 2.5.7
The only logs coming through are:
May 15 12:27:32 php: /snort/snort_interfaces.php: [Snort] Updating rules configuration for: WAN …
May 15 12:27:37 php: /snort/snort_interfaces.php: [Snort] Enabling any flowbit-required rules for: WAN…
May 15 12:27:48 php: /snort/snort_interfaces.php: [Snort] Building new sig-msg.map file for WAN…
May 15 12:27:52 php: /snort/snort_interfaces.php: [Snort] Updating rules configuration for: LAN …
May 15 12:27:56 php: /snort/snort_interfaces.php: [Snort] Enabling any flowbit-required rules for: LAN…
May 15 12:28:07 php: /snort/snort_interfaces.php: [Snort] Building new sig-msg.map file for LAN…I'm still a relatively novice user but I messed about with the settings to try and get Snort to run but haven't had any luck yet. I appreciate your suggestions. :)
-
Greetings, I hope you're all well. I registered to address that I have the same issue, however I don't use PPPoE and also have all the preprocessors ticked except the Sensitive Data box.
The issue began after I re-installed the package to allow an update to 2.9.4.1 pkg v. 2.5.7
The only logs coming through are:
May 15 12:27:32 php: /snort/snort_interfaces.php: [Snort] Updating rules configuration for: WAN …
May 15 12:27:37 php: /snort/snort_interfaces.php: [Snort] Enabling any flowbit-required rules for: WAN…
May 15 12:27:48 php: /snort/snort_interfaces.php: [Snort] Building new sig-msg.map file for WAN…
May 15 12:27:52 php: /snort/snort_interfaces.php: [Snort] Updating rules configuration for: LAN …
May 15 12:27:56 php: /snort/snort_interfaces.php: [Snort] Enabling any flowbit-required rules for: LAN…
May 15 12:28:07 php: /snort/snort_interfaces.php: [Snort] Building new sig-msg.map file for LAN…I'm still a relatively novice user but I messed about with the settings to try and get Snort to run but haven't had any luck yet. I appreciate your suggestions. :)
Can you provide a little additional information?
(1) What version of pfSense (2.0.x or 2.1)?
(2) It would be helpful it you could capture the section of the system log where you start Snort and post it back here.
Bill
-
Greetings, I hope you're all well. I registered to address that I have the same issue, however I don't use PPPoE and also have all the preprocessors ticked except the Sensitive Data box.
The issue began after I re-installed the package to allow an update to 2.9.4.1 pkg v. 2.5.7
The only logs coming through are:
May 15 12:27:32 php: /snort/snort_interfaces.php: [Snort] Updating rules configuration for: WAN …
May 15 12:27:37 php: /snort/snort_interfaces.php: [Snort] Enabling any flowbit-required rules for: WAN…
May 15 12:27:48 php: /snort/snort_interfaces.php: [Snort] Building new sig-msg.map file for WAN…
May 15 12:27:52 php: /snort/snort_interfaces.php: [Snort] Updating rules configuration for: LAN …
May 15 12:27:56 php: /snort/snort_interfaces.php: [Snort] Enabling any flowbit-required rules for: LAN…
May 15 12:28:07 php: /snort/snort_interfaces.php: [Snort] Building new sig-msg.map file for LAN…I'm still a relatively novice user but I messed about with the settings to try and get Snort to run but haven't had any luck yet. I appreciate your suggestions. :)
Can you provide a little additional information?
(1) What version of pfSense (2.0.x or 2.1)?
(2) It would be helpful it you could capture the section of the system log where you start Snort and post it back here.
Bill
Hi Bill :)
Version:
2.0.3-RELEASE (i386)
built on Fri Apr 12 10:22:57 EDT 2013
FreeBSD 8.1-RELEASE-p13Here is the full system log after trying to start from the dashboard widget and then individually through Services > Snort:
May 15 13:38:37 SnortStartup[25558]: Snort STOP for WAN(35288_bge0)…
May 15 13:38:39 SnortStartup[30300]: Snort STOP for LAN(1238_bge1)…
May 15 13:38:43 SnortStartup[34726]: Snort START for WAN(35288_bge0)…
May 15 13:38:45 SnortStartup[36001]: Snort START for LAN(1238_bge1)…
May 15 13:39:20 php: /snort/snort_interfaces.php: Toggle (snort starting) for WAN(WAN)...
May 15 13:39:20 php: /snort/snort_interfaces.php: [Snort] Updating rules configuration for: WAN …
May 15 13:39:21 php: /snort/snort_interfaces.php: Toggle (snort starting) for LAN(LAN)...
May 15 13:39:21 php: /snort/snort_interfaces.php: [Snort] Updating rules configuration for: WAN …
May 15 13:39:24 php: /snort/snort_interfaces.php: [Snort] Enabling any flowbit-required rules for: WAN…
May 15 13:39:25 php: /snort/snort_interfaces.php: [Snort] Enabling any flowbit-required rules for: WAN…
May 15 13:39:36 php: /snort/snort_interfaces.php: [Snort] Building new sig-msg.map file for WAN…
May 15 13:39:37 php: /snort/snort_interfaces.php: [Snort] Building new sig-msg.map file for WAN…
May 15 13:39:39 php: /snort/snort_interfaces.php: [Snort] Updating rules configuration for: LAN …
May 15 13:39:40 php: /snort/snort_interfaces.php: [Snort] Updating rules configuration for: LAN …
May 15 13:39:43 php: /snort/snort_interfaces.php: [Snort] Enabling any flowbit-required rules for: LAN…
May 15 13:39:45 php: /snort/snort_interfaces.php: [Snort] Enabling any flowbit-required rules for: LAN…
May 15 13:39:59 php: /snort/snort_interfaces.php: [Snort] Building new sig-msg.map file for LAN…
May 15 13:40:00 php: /snort/snort_interfaces.php: [Snort] Building new sig-msg.map file for LAN…
May 15 13:40:03 php: /snort/snort_interfaces.php: Snort START for WAN(bge0)...
May 15 13:40:04 php: /snort/snort_interfaces.php: Snort START for LAN(bge1)...Also, some information about the hardware:
CPU: Intel(R) Atom(TM) CPU D2550 @ 1.86GHz
4GB RAMThank you :)
-
Probably because pppoe creates a new interface instead of current real_interface applied to WAN
Instead of bge0, it should be pppoe0
Maybe changes on get_real_interface code on snort to test interface type may fix this issue.
-
I also need some help…
Everything was working fine yesterday and today it seems to have turned it's self off :(I tried to look for that snort.conf file you mentioned but for some reason I have 2 pppoe (sensor) folders and neither one has a config file?
-
I also need some help…
Everything was working fine yesterday and today it seems to have turned it's self off :(I tried to look for that snort.conf file you mentioned but for some reason I have 2 pppoe (sensor) folders and neither one has a config file?
Your dir has pppoe config files but you log shows snort trying on bge0 ???
Maybe this bug is close to be identified and fixed. -
I also need some help…
Everything was working fine yesterday and today it seems to have turned it's self off :(I tried to look for that snort.conf file you mentioned but for some reason I have 2 pppoe (sensor) folders and neither one has a config file?
Your dir has pppoe config files but you log shows snort trying on bge0 ???
Maybe this bug is close to be identified and fixed.did you get me confused with Boags :)
-
hmm well I seem to have "fixed" my issue of snort not launching…
I completely un-installed snort and then re-installed it.
working now with all the rules I had before!?
-
Probably because pppoe creates a new interface instead of current real_interface applied to WAN
Instead of bge0, it should be pppoe0
Maybe changes on get_real_interface code on snort to test interface type may fix this issue.
Not sure how I can change this?
I did generate additional online gateways (which I can't seem to remove) while creating a static connection before this update, could that be causing issues for snort? - note these additions were a few weeks ago and there were no issues prior to the v. 2.5.7 update. -
hmm well I seem to have "fixed" my issue of snort not launching…
I completely un-installed snort and then re-installed it.
working now with all the rules I had before!?
I gave un-installing and re-installing a go. That does nothing for me.
Cheers :)
-
Probably because pppoe creates a new interface instead of current real_interface applied to WAN
Instead of bge0, it should be pppoe0
Maybe changes on get_real_interface code on snort to test interface type may fix this issue.
Not sure how I can change this?
I did generate additional online gateways (which I can't seem to remove) while creating a static connection before this update, could that be causing issues for snort? - note these additions were a few weeks ago and there were no issues prior to the v. 2.5.7 update. -
hmm well I seem to have "fixed" my issue of snort not launching…
I completely un-installed snort and then re-installed it.
working now with all the rules I had before!?
I gave un-installing and re-installing a go. That does nothing for me.
Cheers :)
Determination of the interface on 2.0.x and higher installs with PPPoE gets to be tricky. I'm no expert on the internal workings of pfSense, but I do remember seeing in the code where one of the previous developers hard-coded a "ng0" interface when the Snort code detects PPPoE. Perhaps one of the core team developers familiar with how PPPoE maps to interfaces on FreeBSD 8.1 and higher can chime here. I will be happy to fix the Snort code, but I don't know exactly how best to do that with PPPoE. I no longer have a PPPoE setup of my own since I abandoned DSL for my residence and switched over to a cable modem connection that uses DHCP.
Bill
-
Probably because pppoe creates a new interface instead of current real_interface applied to WAN
Instead of bge0, it should be pppoe0
Maybe changes on get_real_interface code on snort to test interface type may fix this issue.
Not sure how I can change this?
I did generate additional online gateways (which I can't seem to remove) while creating a static connection before this update, could that be causing issues for snort? - note these additions were a few weeks ago and there were no issues prior to the v. 2.5.7 update. -
hmm well I seem to have "fixed" my issue of snort not launching…
I completely un-installed snort and then re-installed it.
working now with all the rules I had before!?
I gave un-installing and re-installing a go. That does nothing for me.
Cheers :)
Determination of the interface on 2.0.x and higher installs with PPPoE gets to be tricky. I'm no expert on the internal workings of pfSense, but I do remember seeing in the code where one of the previous developers hard-coded a "ng0" interface when the Snort code detects PPPoE. Perhaps one of the core team developers familiar with how PPPoE maps to interfaces on FreeBSD 8.1 and higher can chime here. I will be happy to fix the Snort code, but I don't know exactly how best to do that with PPPoE. I no longer have a PPPoE setup of my own since I abandoned DSL for my residence and switched over to a cable modem connection that uses DHCP.
Bill
Hi Bill, I also have a cable modem connection that uses DHCP. I've never connected a DSL / PPPoE line to pfSense before.
Cheers :)