forked from zaclys/searxng
2f40f61f83
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
106 lines
2.3 KiB
JSON
106 lines
2.3 KiB
JSON
[
|
|
{ "name": "suspiciously frequent IP",
|
|
"filters": [],
|
|
"interval": 600,
|
|
"limit": 30,
|
|
"aggregations": [
|
|
"Header:X-Forwarded-For"
|
|
],
|
|
"actions":[
|
|
{"name":"log"}
|
|
]
|
|
},
|
|
{ "name": "search request",
|
|
"filters": [
|
|
"Param:q",
|
|
"Path=^(/|/search)$"
|
|
],
|
|
"interval": 61,
|
|
"limit": 999,
|
|
"subrules": [
|
|
{
|
|
"name": "roboagent limit",
|
|
"interval": 61,
|
|
"limit": 1,
|
|
"filters": [
|
|
"Header:User-Agent=(curl|cURL|Wget|python-requests|Scrapy|FeedFetcher|Go-http-client)"
|
|
],
|
|
"actions": [
|
|
{ "name": "log"},
|
|
{ "name": "block",
|
|
"params": {
|
|
"message": "Rate limit exceeded"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "botlimit",
|
|
"limit": 0,
|
|
"stop": true,
|
|
"filters": [
|
|
"Header:User-Agent=(Googlebot|bingbot|Baiduspider|yacybot|YandexMobileBot|YandexBot|Yahoo! Slurp|MJ12bot|AhrefsBot|archive.org_bot|msnbot|MJ12bot|SeznamBot|linkdexbot|Netvibes|SMTBot|zgrab|James BOT)"
|
|
],
|
|
"actions": [
|
|
{ "name": "log"},
|
|
{ "name": "block",
|
|
"params": {
|
|
"message": "Rate limit exceeded"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "IP limit",
|
|
"interval": 61,
|
|
"limit": 9,
|
|
"stop": true,
|
|
"aggregations": [
|
|
"Header:X-Forwarded-For"
|
|
],
|
|
"actions": [
|
|
{ "name": "log"},
|
|
{ "name": "block",
|
|
"params": {
|
|
"message": "Rate limit exceeded"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "rss/json limit",
|
|
"interval": 121,
|
|
"limit": 2,
|
|
"stop": true,
|
|
"filters": [
|
|
"Param:format=(csv|json|rss)"
|
|
],
|
|
"actions": [
|
|
{ "name": "log"},
|
|
{ "name": "block",
|
|
"params": {
|
|
"message": "Rate limit exceeded"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "useragent limit",
|
|
"interval": 61,
|
|
"limit": 199,
|
|
"aggregations": [
|
|
"Header:User-Agent"
|
|
],
|
|
"actions": [
|
|
{ "name": "log"},
|
|
{ "name": "block",
|
|
"params": {
|
|
"message": "Rate limit exceeded"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|