-
Notifications
You must be signed in to change notification settings - Fork 1
Examples
Griffen Fargo edited this page May 4, 2026
·
1 revision
Real-world configuration examples for common firewall scenarios. All examples are available in the examples folder on GitHub.
Block specific IP addresses or ranges:
{
"ips": [
{
"ip": "192.168.1.100/32",
"action": "deny",
"notes": "Known attacker"
},
{
"ip": "10.0.0.0/8",
"action": "deny",
"notes": "Internal range"
}
]
}Secure specific URL paths:
{
"rules": [
{
"name": "Protect Admin",
"active": true,
"conditionGroup": [
{
"conditions": [
{ "type": "path", "op": "pre", "value": "/admin" }
]
}
],
"action": {
"mitigate": { "action": "challenge" }
}
}
]
}Country-based access control:
{
"rules": [
{
"name": "Block High-Risk Countries",
"active": true,
"conditionGroup": [
{
"conditions": [
{
"type": "geo_country",
"op": "inc",
"value": ["CN", "RU", "KP"]
}
]
}
],
"action": {
"mitigate": { "action": "deny" }
}
}
]
}Limit HTTP methods on specific paths:
{
"rules": [
{
"name": "Read-Only API",
"active": true,
"conditionGroup": [
{
"conditions": [
{ "type": "path", "op": "pre", "value": "/api" },
{ "type": "method", "op": "inc", "value": ["PUT", "DELETE", "PATCH"] }
]
}
],
"action": {
"mitigate": { "action": "deny" }
}
}
]
}Prevent abuse through rate limits:
{
"rules": [
{
"name": "API Rate Limit",
"active": true,
"conditionGroup": [
{
"conditions": [
{ "type": "path", "op": "pre", "value": "/api" }
]
}
],
"action": {
"mitigate": {
"action": "rate_limit",
"rateLimit": {
"requests": 100,
"window": "60s"
}
}
}
}
]
}Bot prevention with browser challenges:
{
"rules": [
{
"name": "Challenge Suspicious Traffic",
"active": true,
"conditionGroup": [
{
"conditions": [
{ "type": "path", "op": "pre", "value": "/login" }
]
}
],
"action": {
"mitigate": { "action": "challenge" }
}
}
]
}Traffic redirection:
Complex condition group combinations:
Filter by browser or client type:
Rules based on HTTP headers:
Multiple protection layers in a single configuration:
- Configuration — Configuration file reference
- Templates — Pre-built rule templates
- Commands Overview — CLI command reference
Getting Started
Configuration
Commands
Guides