How to prevent banned ip showing up as guests in "online" widget.

PatriotGB

Well-known member
Occasionally, I get a big spike in "guests."

1669399776686.webp

When I go look at the list, it's mostly some server in France. Bunches of them, same IP address, all at once.
1669399914652.webp

I've banned this IP address already. I guess that's why they're getting this "viewing an error":
1669400057148.webp

Is there a way to ban an IP address so they don't show up in the current visitors count? Also, what are they actually seeing when "viewing an error?"

Thanks!

Though, I don't know what that means, exactly.
 
If you use Cloudflare (which I would recommend, even their free tier), you can simply block the IP upstream before it reaches your server. Then not only are you blocking it from showing up on your online widget, but you are also saving resources on your server from even needing to process that request. IP blocking is better done at the upstream network level vs. at the application level.

As a rule for that class-C, and voila!... those requests never make it to your server.

1669401252704.webp

1669401309223.webp
 
If you use Cloudflare (which I would recommend, even their free tier), you can simply block the IP upstream before it reaches your server. Then not only are you blocking it from showing up on your online widget, but you are also saving resources on your server from even needing to process that request. IP blocking is better done at the upstream network level vs. at the application level.

As a rule for that class-C, and voila!... those requests never make it to your server.

View attachment 277064

View attachment 277065
Where can I find this Cloudflare addon? Thanks!
 
I found the add-on. I set up an account at Cloudflare. But, holy cow... I have no idea how to get the API token. I have no idea what any of this means:
1669406179678.webp

Also... I'm not seeing any of the screens you've posted above. Where are these settings?
 
OK... I think I'm figuring it out. Got a token. Not sure I got the settings right on the Cloudflare end... took my best guess.

Found the settings on my ACP. But I'm getting this.

1669409772229.webp

I did add the cloudflare name servers. And that can take 24 hours, so maybe that's it?
 
The permissions you want for your API Token are the ones listed in your XenForo admin -> Options -> External Service providers.

It's the same place where you put the token itself.

1669410239832.webp

There's a direct link to your Cloudflare API tokens (that blue button) if you need to get back there.

The Cloudflare side will look something like this:

1669410355586.webp

The token does need you to define permissions initially, but you can use that same token across multiple XenForo sites under the same Cloudflare account.
 
Top Bottom