[Snort-users] Snort home net and external net question

Jason Wallace 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 ... [, ![]]

But you can not do ... [,![]]

Also, order does not matter.

pp. 20-21 Snort Manual

IP Variables and IP Lists

IPs may be specified individually, in a list, as a CIDR block, or any
combination of the three. If IPv6 support is
enabled, IP variables should be specified 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 and IP from to, with the exception of IPs


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 [,,![,]]


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 []
>>> How can I make my external net be !$HOME_NET and 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 []
> [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?
> ie:
> var HOME_NET []
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> Snort-users mailing list
> Snort-users at 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

More information about the Snort-users mailing list