nbs-system / naxsi

NAXSI is an open-source, high performance, low rules maintenance WAF for NGINX
GNU General Public License v3.0
4.8k stars 606 forks source link

$naxsi_flag_learning not working on geo #370

Closed nadzree closed 7 years ago

nadzree commented 7 years ago

I have a problem when integrating geo to naxsi $naxsi_flag_learning.

My setting as below:

geo $learning_ip { 
    default 0; 
    10.0.9.0/24 1; 
    10.0.5.0/24 1; 
}

server {
     if ($learning_ip){ 
        set $naxsi_flag_learning 1; 
    }
}

However the setting works fine if using $remote_addr

server {
     if ($remote_addr = '10.0.9.3'){ 
          set $naxsi_flag_learning 1;
     }
}
nadzree commented 7 years ago

Issue solve after upgrading nginx and naxsi