Snort mailing list archives

Re: bpf filter to filter on *starting* port?


From: Rich Graves <rgraves () carleton edu>
Date: Tue, 8 Feb 2011 14:44:41 -0600 (CST)

I could use "not port 9000" - but that will match
1.2.3.4:9000->5.6.7.8:80 - so I'd end up throwing away good data

not (src port 9000 and src net 1.2.3 and tcp[tcpflags] != tcp-syn) and not (dst port 9000 and dst net 1.2.3 and 
tcp[tcpflags] != (tcp-syn|tcp-ack))

This would log the syn and syn-ack packets of any outbound connection with source 9000. Payload, you still don't get, 
but at least you'll know that you missed something.

Depending on your ultimate goal, you might consider having your firewall or border router reject syns from source port 
9000. Any client that happens to choose that source port will retry. Make sure you send unreachables/resets from your 
interior interface -- best practice is to turn them off for outside.

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users


Current thread: