Snort & PPPoE: Snort refuses to start(?)
-
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 :)
-
Hi Bill, I also have a cable modem connection that uses DHCP. I've never connected a DSL / PPPoE line to pfSense before.
Cheers :)
OK, I think I'm confused. Did you mean in your original post that you do not think Snort is running? And according to this last post you have DHCP with a cable modem on the WAN. If I have those two assumptions, correct, then I'm back on track. Got sidetracked maybe with the PPPoE stuff .. ???
From the log snippet you posted originally, it appears Snort is up and running on two interfaces (LAN and WAN). Your logs are sorted in normal order with the oldest events listed first. The bottom two entries show Snort starting up. How are you determining Snort is not actually running? If you are depending on the icon in the Snort Interfaces tab, note that they are currently "backwards" from the other pfSense GUI. The red X means "running". That will be changing in the next package version so it more accurately matches the rest of the pfSense GUI.
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 :)
OK, I think I'm confused. Did you mean in your original post that you do not think Snort is running? And according to this last post you have DHCP with a cable modem on the WAN. If I have those two assumptions, correct, then I'm back on track. Got sidetracked maybe with the PPPoE stuff .. ???
From the log snippet you posted originally, it appears Snort is up and running on two interfaces (LAN and WAN). Your logs are sorted in normal order with the oldest events listed first. The bottom two entries show Snort starting up. How are you determining Snort is not actually running? If you are depending on the icon in the Snort Interfaces tab, note that they are currently "backwards" from the other pfSense GUI. The red X means "running". That will be changing in the next package version so it more accurately matches the rest of the pfSense GUI.
Bill
That's correct Bill.
It would appear in the system log that Snort would actually be running, however ram usage (always below 10%), the widget icon (showing that Snort is not running) and the lack of blocking alerts indicates otherwise. Snort doesn't seem to turn on, not even initially.
Things I've tried since my last post; I was able to remove the additional gateways in routing, I turned off 'save settings' in Snort and then uninstalled, re-installed the package with fresh default settings. No luck.
Cheers :)
-
That's correct Bill.
It would appear in the system log that Snort would actually be running, however ram usage (always below 10%), the widget icon (showing that Snort is not running) and the lack of blocking alerts indicates otherwise. Snort doesn't seem to turn on, not even initially.
Things I've tried since my last post; I was able to remove the additional gateways in routing, I turned off 'save settings' in Snort and then uninstalled, re-installed the package with fresh default settings. No luck.
Cheers :)
OK, from a command prompt on the firewall, execute this command see what it shows:
ps -ax |grep snort
The above command should show two running Snort processes with the associated command-line arguments.
Post back with what it shows, if anything.
As for RAM usage, unless you have a lot of traffic coming through your box, RAM usage may very well stay down in that range. I have 4GB in my firewall and my RAM usage on my home network rarely exceeds 10%-14%.
Bill
-
That's correct Bill.
It would appear in the system log that Snort would actually be running, however ram usage (always below 10%), the widget icon (showing that Snort is not running) and the lack of blocking alerts indicates otherwise. Snort doesn't seem to turn on, not even initially.
Things I've tried since my last post; I was able to remove the additional gateways in routing, I turned off 'save settings' in Snort and then uninstalled, re-installed the package with fresh default settings. No luck.
Cheers :)
OK, from a command prompt on the firewall, execute this command see what it shows:
ps -ax |grep snort
The above command should show two running Snort processes with the associated command-line arguments.
Post back with what it shows, if anything.
As for RAM usage, unless you have a lot of traffic coming through your box, RAM usage may very well stay down in that range. I have 4GB in my firewall and my RAM usage on my home network rarely exceeds 10%-14%.
Bill
Alright, this is the result:
$ ps -ax |grep snort
58727 ?? S 0:00.00 sh -c ps -ax |grep snort
59007 ?? S 0:00.00 grep snortAlso to note, previously when Snort was always running, I never got below 90% memory. I also leave it on 24-7 so that it gathers a solid blocked hosts list. The performance setting I go with is AC-STD for both WAN and LAN.
Cheers :)