Initial commit

This commit is contained in:
Gitea
2021-10-27 17:20:29 +02:00
commit 0a35a1a0ec
4985 changed files with 206213 additions and 0 deletions
+91
View File
@@ -0,0 +1,91 @@
[
{
"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."}}
]
}
]
}
]