This repository has been archived on 2024-07-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2021-10-27 17:20:29 +02:00

92 lines
3.4 KiB
JSON

[
{
"name": "search request",
"filters": ["Param:q", "Path=^(/|/search)$"],
"interval": 60,
"limit": 20,
"actions": [
{
"name": "log",
"params": {"destination": "/var/log/filtron.log"}},
{
"name": "block",
"params": {"message": "Rate limit exceeded"}}
],
"subrules": [
{
"name": "roboagent limit",
"interval": 120,
"limit": 5,
"filters": ["Header:User-Agent=(curl|cURL|Wget|python-requests|Scrapy|FeedFetcher|Go-http-client|UniversalFeedParser|Ruby)"],
"actions": [
{"name": "log",
"params": {"destination": "/var/log/filtron.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",
"params": {"destination": "/var/log/filtron.log"}},
{"name": "block",
"params": {"message": "Rate limit exceeded"}}
]
},
{
"name": "IP limit",
"interval": 60,
"limit": 60,
"stop": true,
"aggregations": ["Header:X-Forwarded-For"],
"actions": [
{"name": "log",
"params": {"destination": "/var/log/filtron.log"}},
{"name": "block",
"params": {"message": "Rate limit exceeded, try again later."}}
]
},
{
"name": "rss/json limit",
"limit": 0,
"stop": true,
"filters": ["Param:format=(csv|json|rss)"],
"actions": [
{"name": "log",
"params": {"destination": "/var/log/filtron.log"}},
{"name": "block",
"params": {"message": "Rate limit exceeded, try again later."}}
]
},
{
"name": "language limit",
"limit": 0,
"stop": true,
"filters": ["Param:language=(es|ru|tr|en-US|zh)"],
"actions": [
{"name": "log",
"params": {"destination": "/var/log/filtron.log"}},
{"name": "block",
"params": {"message": "Rate limit exceeded, try again later."}}
]
},
{
"name": "useragent limit",
"interval": 60,
"limit": 5,
"aggregations": ["Header:User-Agent"],
"actions": [
{"name": "log",
"params": {"destination": "/var/log/filtron.log"}},
{"name": "block",
"params": {"message": "Rate limit exceeded, try again later."}}
]
}
]
}
]