[ learn ]

How VPN and proxy detection works

Updated · 5 min read

Short answer

VPN and proxy detection compares an IP address with what is known about it: whether it belongs to a data centre or hosting network, whether it is on lists of VPN servers, open proxies or Tor exit nodes, and whether it has been seen acting like an anonymising service. The result is a strong signal, not proof, so a flag should trigger a closer look rather than an automatic ban.

The main signals

  • Hosting and data-centre ranges. Most commercial VPNs and proxies rent servers from cloud and hosting companies. Real people rarely browse from these networks, so an address in a hosting ASN (AWS, Google Cloud, DigitalOcean, OVH, Hetzner and so on) is often a VPN, proxy, scraper or bot.
  • Known VPN exit lists. Detection providers subscribe to VPN services and record the addresses of their servers, and also use published server lists and hostnames.
  • Tor exit lists. The Tor Project publishes the addresses of Tor relays, including the exit relays where Tor traffic reaches the open internet, so Tor detection is very reliable.
  • Open proxy scans. Addresses that accept connections on proxy ports (HTTP, SOCKS) for anyone are found by scanning and listed.
  • Behaviour. Many unrelated accounts from one address, a browser time zone that does not match the IP country, latency that is too high for the claimed location, or hostnames containing words like vpn.
  • Threat intelligence. Honeypots, abuse reports and blocklists record addresses seen scanning, brute-forcing logins or sending spam.

The hardest case is residential proxies: traffic routed through ordinary home connections, sometimes via apps or malware on the owner's device. They look like normal ISP addresses and are caught mainly through behaviour and threat feeds.

What our security fields mean

Every lookup from the API includes a security object. The flags come from the geolocation and threat data providers this site uses, and are cached:

FieldTrue when the address…
is_vpnis a known VPN server exit
is_proxyis a known open or anonymous proxy (HTTP, SOCKS or web proxy)
is_toris part of the Tor network (any Tor relay)
is_tor_exitis a Tor exit node, where Tor users' traffic leaves the network and reaches websites
is_relaybelongs to a privacy relay such as iCloud Private Relay, which hides the user's address but keeps an approximate region
is_cloud_provideris in a cloud or hosting provider's range
is_anonymoususes any anonymising service: true when is_vpn, is_proxy, is_tor or is_relay is true
is_attackerhas recently been seen attacking: scanning, brute-force logins, exploits
is_abuserhas recently been seen abusing services: spam, fake sign-ups, fraud
is_threatis considered a threat overall (an attacker or abuser)
is_bogonshould not appear on the public internet at all (private, reserved or unallocated)
"security": {
  "is_vpn": true,  "is_proxy": false, "is_tor": false, "is_tor_exit": false,
  "is_relay": false, "is_cloud_provider": true, "is_anonymous": true,
  "is_attacker": false, "is_abuser": false, "is_threat": false, "is_bogon": false
}

The quick /json view on this site shows a short version (vpn, proxy, tor, hosting).

False positives and false negatives

No detection is perfect, in either direction.

  • False positives: company and school networks that route staff through a VPN or cloud gateway; millions of ordinary Apple users on iCloud Private Relay; shared mobile and CGNAT addresses that get an "abuser" reputation because of one bad user; and addresses that used to belong to a VPN but have since been reassigned.
  • False negatives: brand-new VPN servers not yet listed, self-hosted VPNs on a home connection, and residential proxies.

This is also why VPN users can appear in the wrong country: the location is that of the exit server.

How to use the flags well

  • Respond in steps. Allow most traffic, ask for extra verification (email, SMS, 3-D Secure) when signals stack up, and block only on strong combinations such as is_threat plus is_tor_exit on a payment form.
  • Do not ban VPN users by default. Many use a VPN for privacy or because their employer requires it.
  • Combine signals. Weigh the IP flags together with account age, payment data and behaviour.
  • Keep the reasons. Store which flags triggered a decision so support staff can explain it.

The fraud prevention and access control use cases show working scoring code.

[ FAQ ]

Frequently asked questions

Can VPN detection be 100% accurate?

No. It is very reliable for Tor and well-known commercial VPNs, less so for new servers, self-hosted VPNs and residential proxies, and it can wrongly flag shared or corporate addresses. Treat the flags as signals, not proof.

Why is my home IP address flagged as a proxy or abuser?

Possible reasons are that you share the address with other customers through carrier-grade NAT, the address was recently used by someone else, or a device or app on your network is acting as a residential proxy. Restarting the router may give you a new address.

What is the difference between is_tor and is_tor_exit?

is_tor is true for any Tor relay. is_tor_exit is true only for exit relays, the ones that send Tor users' traffic out to websites. Traffic reaching your site from Tor comes from exit relays.

Should I block all VPN users?

Usually not. Many legitimate people use VPNs for privacy or work. A better approach is to ask VPN users for extra verification on sensitive actions and to block only when several risk signals appear together.

Last updated · All articles · API docs