Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable under attack mode by country, ASN #117

Open
sanvu88 opened this issue Nov 25, 2022 · 4 comments
Open

Enable under attack mode by country, ASN #117

sanvu88 opened this issue Nov 25, 2022 · 4 comments

Comments

@sanvu88
Copy link

sanvu88 commented Nov 25, 2022

Don't know if the module supports enable under attack mode by country, ASN ? If possible, hope you can support this feature. Thank so much.

@hibobmaster
Copy link

You can use geoip2 module.
https://docs.addesp.com/ngx_waf/advance/directive.html#waf-under-attack
leev/ngx_http_geoip2_module#76

@sanvu88
Copy link
Author

sanvu88 commented Nov 28, 2022

You can use geoip2 module. https://docs.addesp.com/ngx_waf/advance/directive.html#waf-under-attack leev/ngx_http_geoip2_module#76

But when i try with the following configuration

map $geoip_country_code $block_country {
US 0;
default 1;
}

server {
....
waf on;
if ($block_country){
waf_under_attack on;
}
}

I get the error message "waf_under_attack" directive is not allowed here

@hibobmaster
Copy link

hibobmaster commented Nov 28, 2022

I got the same error. Let wait for help from developer, but she is busy with other projects.

@lequi
Copy link

lequi commented Oct 28, 2023

Same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants