LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-20-2022, 04:22 PM   #1
Snorty101
LQ Newbie
 
Registered: May 2022
Posts: 3

Rep: Reputation: 0
Snort 3 resets not working.


I am running snort 3 inline mode and trying to get active response to work.
When I ping a host located behind snort inline I get a "connection timeout" when I with active response and reject action in rule should get "Destination port unreachable"....???
When I look at the snort log it reads [reset], so the reset should be sent but still "connection timeout" when sending a ping...
Below are my configs:

ips =
{
mode = inline,
enable_builtin_rules = true,
variables = default_variables,
rules = [[ rules-here ]]
}

reject = { control="all", reset="both" }

active = { attempts = 2, device = "eth0", dst_mac = "mac-addr-of-eth0",}

normalizer = { tcp = { ips = true, } }


Starting snort with:

snort -c snort.lua --daq-dir /usr/local/lib/daq --daq afpacket --daq-var fanout_type=hash \
-s 65535 -k none -l /var/log/snort -Q -i eth0:enx5ca6e6fb7f8a -D


And icmp rule:
reject icmp any any -> any any (msg:"icmp"; sid:1; )


Any ideas what is wrong/missing??

Last edited by Snorty101; 05-21-2022 at 10:33 AM.
 
Old 05-23-2022, 09:20 AM   #2
Snorty101
LQ Newbie
 
Registered: May 2022
Posts: 3

Original Poster
Rep: Reputation: 0
What could be the potential cause of "Icmp port unreachable" response from snort being blocked when sending a ping, or not sent at all?
Since snort log says [reset] it should be sent...
Could it be a bug in snort 3 since its fairly new and beta?

Two strange things that Ive noticed is:
1. Module rewrite is not being loaded when snort starts despite being set in snort.lua ---> rewrite = { }

2. When commented out module active is still being loaded on snort startup --active{} (commented out like that)

Any help would be appreciated.

Last edited by Snorty101; 05-23-2022 at 11:35 AM.
 
Old 06-12-2022, 12:24 PM   #3
Snorty101
LQ Newbie
 
Registered: May 2022
Posts: 3

Original Poster
Rep: Reputation: 0
I asked snort mailing list and they said that snort does not respond to ping so everything is correct with the timeout when pinging.
They recommended me to remove module "active" completely.
Its also a good idea to disable builtin rules(enable_builtin_rules = true) by removing it.Text rules(Community rules for example) has abilities to shut down connections drop,block,reject, which builtin rules can not do and is more suited to testing purposes to my understunding.Builtin rules also overrides text rules and has no rule action(drop,block,reject) which leads to no action when some text rules are triggered, IF builtin rules are enabled that is.

So the correct configuration will be following:

ips =
{
mode = inline,
variables = default_variables,
rules = [[ rule1 rule2 rule3 ]]
}

reject = { control="all", reset="both" }

normalizer = { tcp = { ips = true, } }


Starting snort with:

snort -c snort.lua --daq-dir /usr/local/lib/daq --daq afpacket --daq-var fanout_type=hash \
-s 65535 -k none -l /var/log/snort -Q -i eth0:enx5ca6e6fb7f8a -D

Last edited by Snorty101; 06-19-2022 at 05:33 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"random" xorg resets ... quickly typing in the GUI a "2" resets X Tinkster Slackware 3 04-09-2010 04:25 AM
Ctrl-click not working to select multiple files; selects a few then resets selection sandaili Linux - Newbie 3 08-04-2008 06:54 PM
Error when starting up snort: bash:!/bin/sh/usr/local/bin/snort :Eent not found cynthia_thomas Linux - Software 1 11-11-2005 02:59 PM
snort failed: snort: symbol lookup error: undefined symbol: usmAES192PrivProtocol Emmanuel_uk Linux - Security 1 07-10-2005 10:29 AM
snort snort.conf help crealkiller175 Linux - Software 1 03-08-2003 05:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration