[GH-ISSUE #117] Enable under attack mode by country, ASN #90

Open
opened 2026-03-04 12:18:50 +03:00 by kerem · 4 comments
Owner

Originally created by @sanvu88 on GitHub (Nov 25, 2022).
Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/117

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.

Originally created by @sanvu88 on GitHub (Nov 25, 2022). Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/117 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.
Author
Owner
<!-- gh-comment-id:1327980483 --> @hibobmaster commented on GitHub (Nov 26, 2022): You can use geoip2 module. https://docs.addesp.com/ngx_waf/advance/directive.html#waf-under-attack https://github.com/leev/ngx_http_geoip2_module/issues/76
Author
Owner

@sanvu88 commented on GitHub (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

<!-- gh-comment-id:1328441524 --> @sanvu88 commented on GitHub (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](https://github.com/leev/ngx_http_geoip2_module/issues/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
Author
Owner

@hibobmaster commented on GitHub (Nov 28, 2022):

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

<!-- gh-comment-id:1328450520 --> @hibobmaster commented on GitHub (Nov 28, 2022): I got the same error. Let wait for help from developer, but she is busy with other projects.
Author
Owner

@lequi commented on GitHub (Oct 28, 2023):

Same error.

<!-- gh-comment-id:1783735544 --> @lequi commented on GitHub (Oct 28, 2023): Same error.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ngx_waf#90
No description provided.