mirror of
https://codeberg.org/gigirassy/nixos-server-config
synced 2026-08-30 15:27:40 +00:00
Add anubis-rules/botPolicy.yaml
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
|
||||
bots:
|
||||
# Pathological bots to deny
|
||||
- # This correlates to data/bots/deny-pathological.yaml in the source tree
|
||||
# https://github.com/TecharoHQ/anubis/blob/main/data/bots/deny-pathological.yaml
|
||||
import: (data)/bots/_deny-pathological.yaml
|
||||
- import: (data)/bots/aggressive-brazilian-scrapers.yaml
|
||||
|
||||
- import: /amazonips.yaml # deny aws ips due to frequent scraper usage
|
||||
- import: /oracleips.yaml # despite the name oraclenhuawei, this is a list ive compiled of datacenter ip ranges used by scrapers
|
||||
|
||||
# Aggressively block AI/LLM related bots/agents by default
|
||||
- import: (data)/meta/ai-block-aggressive.yaml
|
||||
|
||||
# Challenge Firefox AI previews
|
||||
- import: (data)/clients/x-firefox-ai.yaml
|
||||
|
||||
# Allow common "keeping the internet working" routes (well-known, favicon, robots.txt)
|
||||
- import: (data)/common/keep-internet-working.yaml
|
||||
|
||||
- name: whitelist-home-ip
|
||||
action: ALLOW
|
||||
expression:
|
||||
remoteAddress == "REDACTED" # nice try
|
||||
|
||||
- name: fastside
|
||||
action: ALLOW
|
||||
expression:
|
||||
remoteAddress == "194.62.248.14"
|
||||
|
||||
- name: donottrack_strict
|
||||
action: CHALLENGE
|
||||
expression:
|
||||
all:
|
||||
- '"Dnt" in headers'
|
||||
- 'headers["Dnt"] == "1"'
|
||||
- '"Sec-Gpc" in headers'
|
||||
- 'headers["Sec-Gpc"] == "1"'
|
||||
- '"Te" in headers'
|
||||
- 'headers["Te"] == "trailers"'
|
||||
- '"Priority" in headers'
|
||||
challenge:
|
||||
algorithm: fast
|
||||
difficulty: 5
|
||||
report_as: 1
|
||||
|
||||
|
||||
- name: generic-browser
|
||||
user_agent_regex: >-
|
||||
Mozilla|Opera
|
||||
action: CHALLENGE
|
||||
challenge:
|
||||
algorithm: fast
|
||||
difficulty: 3
|
||||
report_as: 1
|
||||
|
||||
dnsbl: true
|
||||
|
||||
status_codes:
|
||||
CHALLENGE: 200
|
||||
DENY: 429
|
||||
# ^ | tricks bots into making less requests
|
||||
Reference in New Issue
Block a user