Crazy amount of guests

Anubis is what I use, so I am a bit biased towards it.

I am also leaning towards it. Here is my wishlist and I will try to accomplish it with Anubis:

Members that chose "remain always logged in" should never be bothered with a challenge. Members that are logging in can receive a challenge, no problem. Guests also can receive a challenge, no problem.

If these can be accomplished with Anubis, I think it is a complete and sufficient solution.
 
I am also leaning towards it. Here is my wishlist and I will try to accomplish it with Anubis:

Members that chose "remain always logged in" should never be bothered with a challenge. Members that are logging in can receive a challenge, no problem. Guests also can receive a challenge, no problem.

If these can be accomplished with Anubis, I think it is a complete and sufficient solution.
This should accomplish the user logged in check. Anubis, like others, does checks against client cookies. If the cookie exists, it is validated for the name and then permits the client, bypassing the challenge:

YAML:
  - name: XenForoUserLoggedIn
    action: ALLOW
    expression:
      all:
        - '"Cookie" in headers'
        - 'headers["Cookie"].contains("xf_user=")'

Here's a config file that can be used as a starting point:

YAML:
bots:
  - name: PermitIndexAndCore
    action: ALLOW
    expression:
      any:
        - path == "/"
        - path.startsWith("/js/")
        - path == "/css.php"
        - path.startsWith("/admin.php")
        - path.startsWith("/styles/")
        - path.startsWith("/data/")
        - path.startsWith("/api/")
  - name: XenForoUserLoggedIn
    action: ALLOW
    expression:
      all:
        - '"Cookie" in headers'
        - 'headers["Cookie"].contains("xf_user=")'
  - import: /etc/anubis/data/clients/discord-embed.yaml
  - import: /etc/anubis/data/crawlers/_allow-good.yaml
  - import: /etc/anubis/data/crawlers/alibaba-cloud.yaml
  - import: /etc/anubis/data/crawlers/tencent-cloud.yaml
  - import: /etc/anubis/data/bots/aggressive-brazilian-scrapers.yaml
  - import: /etc/anubis/data/bots/ai-catchall.yaml
  - import: /etc/anubis/data/bots/headless-browsers.yaml
  - import: /etc/anubis/data/common/keep-internet-working.yaml
  - import: /etc/anubis/data/common/allow-private-addresses.yaml
  - import: /etc/anubis/data/common/rfc-violations.yaml
  - name: challenge-all
    action: CHALLENGE
    path_regex: .*
    challenge:
      algorithm: fast
      difficulty: 4
store:
  backend: valkey
  parameters:
    url: "redis://10.48.0.10:6379/6"

What the above does:

1. Allows all clients to view the index without a challenge.
1a. If the client goes to view something that isn't the index or XF2's core components (JS/CSS), challenge.
2. If the client has an xf_user cookie set, bypass challenge.
3. If client is a 'good bot', no challenge, bypass/allow.
4. If the client is a 'bad bot' (or otherwise configured), explicit deny or harshly challenge.
5. Anything not caught by the rules set, auto-challenge at a level of 4.

In my case, all sessions for the challenge system, are stored to redis/valkey - no memory storage on Anubis itself. Which in turn means you can also spin up additional Anubis instances for the same domain if ever required/desired.

There is also the weights system, but it's fairly advanced when it comes to "finding that sweet spot". It's a careful balance between pissing off legitimate users and harshly blocking bots. No one likes challenges/walled gardens, but we're all unfortunately at a point where abusive bots need to be curbed.
 
3. If client is a 'good bot', no challenge, bypass/allow.
How does Anubis identify a good bot? I'd like Google to be able to index, but want to be sure it's coming directly from Google and not a bot spoofing Google. (I'd like to think it checks the ASN or IPs to determine that.)

BTW, posting configs for Anubis is very helpful for someone like me. I absolutely refuse to use or trust AI (why contribute to our bot issues and increase the harm on our environment?), so if anyone has proven, battle-tested configs, that is the most helpful.

Somewhat related to that idea: I wish we had a way to use more of the headers in XF. I am starting to think that if a thread is locked, or we move it to an "archive" forum, we would be able to let Google and others we allow to index those threads, yet guests would have to sign up to read them. (The permission could be to let guests see thread titles and maybe a few posts as a teaser, but require joining to view the entire thread.) And the bots would have very little to chew on and not drag down the server. We could use the CF "verified bots" header to help with that, as an example.
 
Going off of my analytics this morning...

Is there any reason we should allow wowrack.com to visit our forums? My single concern is that they might operate a VPN service for end users. If not, I'm blocking them outright. They regularly appear as unmitigated traffic.
 
I would never use Country blocking.
I'm very glad we can! Zero reason for us to have anyone on our websites from many countries responsible for nefarious activities. Zero reward, all risk.
Country, IP, and ASN blocking does nothing for the residential proxies, which in many (most?) cases is the bulk of bot traffic we are seeing on our sites these days during attacks.
Even if true, that doesn't mean you shouldn't block traffic from them as a good practice..

From our recent http error report/log on residential proxies.
Scraper bursts: Several bursts of 10–20 distinct IPs hit /whats-new/posts/<id>/page-2..5, /members/.../trophies, and /posts/.../reactions within seconds (e.g., 11:21:57–11:22:09 in httperr3408.log) and were all Request_Cancelled. This is typical of distributed residential-proxy scrapers hitting uncached XenForo endpoints; your abort/rate-limiting rules are successfully cutting them off

Is there any reason we should allow wowrack.com to visit our forums?
I block all this kind of nonsense traffic on the server firewall. All risk, no reward. Extremely slim chance a small business is running an email server there and it will block emails from that network.
 
Back
Top Bottom