Re: Different Naxsi rulesets

2017-11-15 Thread Jean-Paul Hemelaar
Hi, With help from the Naxsi maillist I found that my idea is indeed not possible. Naxsi doesn't process subrequests, so that's why it didn't work as I expected. It seems to be on the roadmap to change this behavior. My workaround for now it to move the two rulesets into different server blocks i

Re: Different Naxsi rulesets

2017-11-13 Thread Aziz Rozyev
hello, how about logs? does naxisi provide any variables that can be monitored? so far it seems that your rules in ‘strict|relaxed’ are not triggering, the ‘default’ one will always hit (as expected), as it’s first location ‘/‘ from where you route to other 2 locations. also, try to log in deb

Re: Different Naxsi rulesets

2017-11-13 Thread Jean-Paul Hemelaar
Hi, I have updated the config to use 'map' instead of the if-statements. That's indeed a better way. The problem however remains: - Naxsi mainrules are in the http-block - Config similar to: map $geoip_country_code $ruleSetCC { default "strict"; CC1 "relaxed"; CC2 "re

Re: Different Naxsi rulesets

2017-11-13 Thread Aziz Rozyev
At first glance config looks correct, so probably it’s something with naxi rulesets. Btw, why don’t you use maps? map $geoip_coutnry_code $strictness { default “strict"; CC_1“not-so-strict"; CC_2“not-so-strict"; # .. more country codes; } # strict and not-so-strict locations ma

Re: Different Naxsi rulesets

2017-11-12 Thread Jean-Paul Hemelaar
Hi Aziz, True; this got lost during my copy-anonymize-paste process. The real config doesn't have this. Thanks so far, JP On Sun, Nov 12, 2017 at 2:34 PM, Aziz Rozyev wrote: > at least you’re missing or (|) operator between > > > TRUSTED_CC_2 and TRUSTED_CC_3 > > > > br, > Aziz. > > > > > >

Re: Different Naxsi rulesets

2017-11-12 Thread Aziz Rozyev
at least you’re missing or (|) operator between > TRUSTED_CC_2 and TRUSTED_CC_3 br, Aziz. > On 12 Nov 2017, at 14:03, Jean-Paul Hemelaar wrote: > > Hi! > > I'm using Nginx together with Naxsi; so not sure it this is the correct place > for this post, but I'll give it a try. > > I wa

Different Naxsi rulesets

2017-11-12 Thread Jean-Paul Hemelaar
Hi! I'm using Nginx together with Naxsi; so not sure it this is the correct place for this post, but I'll give it a try. I want to configure two detection thresholds: a strict detection threshold for 'far away countries', and a less-strict set for local countries. I'm using a setup like: locatio