A way to detect VPNs

AI-generated summary

The discussion addresses the challenge of detecting and blocking VPNs to prevent ban evasion on Discourse forums. Bobby99as initiates the thread by asking for a method to block VPNs from creating accounts to stop users from circumventing IP bans. marianord responds that there is no easy solution, noting that even major streaming services struggle to block commercial VPNs effectively. ARHAEEM suggests blocking IPs not flagged as “residential,” sharing personal experience where their Hetzner RDP was blocked by forums using Cloudflare to identify hosting IPs. michc adds that while no ready solution exists within the core, integration with third-party APIs like IP2 Location.io can detect VPNs, residential proxies, and data center origins. Finally, champ shares a practical success story, recommending the [ProxyTracer](https://github.com/ProxyTrac er/discourse-proxytracer) plugin, which has significantly reduced nuisance accounts on their forum by blocking VPN users from registering or logging in.

Is there a way to detect VPNs and block them from creating accounts because if there’s a way to do that that’d be nice as it would stop people from using them to circumvent ip bans

2 Likes

There’s no really easy way, specially with the commercial VPNs who have evolved to circumvent the solutions put in place by Netflix, Hulu, etc.

So, if multibillion companies have not managed to effectevily block commercials VPNs, Discourse will not be able.

5 Likes

The best way i see on other forums is to block any ip is not flagged as “residential ip”, and i think they’re doing it through cloudflare dashboard. I own an RDP from Hetzner and seeing forums blocking the server ip from visiting their posts and getting cloudflare block page. When i checked the IP on ipinfo.io i saw that it’s already flagged as hosting ip

There is no ready solution. However, it is possible to detect VPN. You need to integrate the login with 3rd party API such as IP2Location.io. It reports VPN, residential proxy or even if the IP address originating from data center.

I was dealing with the exact same issue of trolls using VPNs to evade IP bans and spin up new accounts on my forum. I eventually found a plugin called ProxyTracer that allowed me to block VPN users from registering or logging in and it’s been working great at significantly reducing the amount of nuisance that I have to deal with.

1 Like