[Snort-users] Snort home net and external net question
jason.r.wallace at ...11827...
Fri Sep 3 14:25:16 EDT 2010
That error is because the /16 contains the /24 (bigger = more general)
You can do ... [10.1.0.0/16, ![10.1.1.0/24]]
But you can not do ... [10.1.1.0/24,![10.1.0.0/16]]
Also, order does not matter.
pp. 20-21 Snort Manual
IP Variables and IP Lists
IPs may be speciﬁed individually, in a list, as a CIDR block, or any
combination of the three. If IPv6 support is
enabled, IP variables should be speciﬁed using ’ipvar’ instead of
’var’. Using ’var’ for an IP variable is still allowed
for backward compatibility, but it will be deprecated in a future release.
IPs, IP lists, and CIDR blocks may be negated with ’!’. Negation is
handled differently compared with Snort versions
2.7.x and earlier. Previously, each element in a list was logically
OR’ed together. IP lists now OR non-negated
elements and AND the result with the OR’ed negated elements.
The following example list will match the IP 184.108.40.206 and IP from
220.127.116.11 to 18.104.22.168, with the exception of IPs 22.214.171.124
The order of the elements in the list does not matter. The element
’any’ can be used to match all IPs, although ’!any’
is not allowed. Also, negated IP ranges that are more general than
non-negated IP ranges are not allowed.
See below for some valid examples if IP variables and IP lists.
ipvar EXAMPLE [126.96.36.199,188.8.131.52/24,![184.108.40.206,220.127.116.11]]
P.S. It being Friday and all... I think that is worth 1 drink...
On Fri, Sep 3, 2010 at 1:54 PM, waldo kitty <wkitty42 at ...14940...> wrote:
> On 9/3/2010 12:52, Joel Esler wrote:
>> On Sep 3, 2010, at 11:01 AM, Andy Berryman wrote:
>>> If I have my home net of snort set to:
>>> var HOME_NET [10.215.0.0/16]
>>> How can I make my external net be !$HOME_NET and 10.215.40.0/24 subnet?
>> With recent versions of Snort,
> please define "recent"... 2.8.3?
>> you can do positives and negatives in the same
>> variable, but the more specific entry needs to come first.
> > var HOME_NET [10.215.0.0/16]
> > var EXTERNAL_NET [10.216.40.0/16,!$HOME_NET]
> [aside] bug alert in the above! 2 bugs exist [/aside]
> now that's nice and a lot easier than using a CIDR calculator to work out the
> ranges as i did for my reply...
> if you have two or more sub-ranges, they all go first before !HOME_NET?
> does their numerical order matter?
> var HOME_NET [10.215.0.0/16]
> var EXTERNAL_NET [10.215.33.0/24,10.215.40.0/24,10.215.77.0/24,!$HOME_NET]
> This SF.net Dev2Dev email is sponsored by:
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> Snort-users mailing list
> Snort-users at lists.sourceforge.net
> Go to this URL to change user options or unsubscribe:
> Snort-users list archive:
More information about the Snort-users