Skip to content

Commit 03a5a09

Browse files
sebartyrdavlgd
authored andcommitted
add section about IP blocking
1 parent 707d5fa commit 03a5a09

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

content/doc/addons/otoroshi.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,22 @@ The integration provides advanced security capabilities through OWASP CRS implem
107107
### Enterprise Capabilities
108108
Designed for production environments, the Coraza WAF plugin offers flexible configuration options, supporting both detection and prevention modes. It enables customized rule sets per domain and provides detailed security event tracking through Otoroshi's event management system. The implementation is optimized for minimal performance impact while maintaining robust security controls.
109109

110+
### Block single IPs
111+
112+
To block a single IP, you don't need Coraza WAF. In the "routes" section, choose the route you want to protect and then you should be able to add the plugin "IP Block list" and block one or several IPs.
113+
114+
Coraza is able to block IPs (or CIDR) too but you need to add customs rules based on "X-Forwarded-For" header such as:
115+
116+
```coraza
117+
SecRule REQUEST_HEADERS:X-Forwarded-For "@ipMatch 82.0.0.0/8" \
118+
"id:100006,\
119+
phase:1,\
120+
drop,\
121+
status:503,\
122+
log,\
123+
msg:'Forbidden IP range detected in Forwarded header'"
124+
```
125+
110126
- [Otoroshi Coraza WAF documentation](https://maif.github.io/otoroshi/manual/how-to-s/instantiate-waf-coraza.html)
111127

112128
## Manage Otoroshi from its API

0 commit comments

Comments
 (0)