
Your Fraud Engine Is Guessing: The Real Problem With IP-Based VPN Detection
The key insight: IP geolocation was never designed to answer the question you're asking it. You want to know "is this a real person at a real location, or a VPN-hiding fraudster?" But IP geolocation only knows "which network hardware is this packet routed through?" Those are very different questions, and conflating them is why a Spectrum customer streaming Netflix at home gets flagged as a high-risk VPN mid-checkout.
This isn't a bug in one vendor's database. It's structural.
Why the signal is noisy by design
IP geolocation databases map infrastructure, not people. An ISP's routing architecture, regional peering hubs, CGNAT pools, and mobile carrier gateways can all put a legitimate residential user behind an IP that looks — from a database's perspective — identical to a commercial VPN exit node or a shared proxy.
<> Accuracy at the country level is often solid. Accuracy at the city level — the level most fraud rules actually rely on — degrades sharply, and mobile networks make it worse./>
This matters because most fraud engines aren't asking "what country is this?" They're asking granular questions: is this IP this specific ASN's known-VPN range? Has it moved impossibly between sessions? Those questions require precision the underlying data doesn't reliably provide, especially for:
- Mobile networks, where carrier-level NAT can make error rates far higher than fixed broadband
- CGNAT-heavy regions, where thousands of residential users share the same public IP
- Anywhere outside North America and Europe, where commercial IP databases have historically weaker coverage and get updated less frequently
So when your fraud vendor says "90% confidence this is a VPN," that confidence score is built on a foundation that's already shakiest exactly where residential ambiguity is highest.
The architecture mistake that compounds it
Here's the part that's actually your fault, not the database's: a lot of teams don't even geolocate the user's IP. They geolocate their own infrastructure.
If you're behind a CDN, load balancer, or reverse proxy and you're not carefully extracting the real client IP, you're feeding your fraud engine the address of your own edge node.
1// WRONG: req.socket.remoteAddress will be your proxy/LB, not the client
2const clientIp = req.socket.remoteAddress;
3
4// BETTER: trust only headers from your known proxy, and validate the chain
5function getClientIp(req: Request, trustedProxies: string[]): string {
6 const forwarded = req.headers['x-forwarded-for'];
7 if (!forwarded) return req.socket.remoteAddress ?? '';
8If this is wrong, every downstream decision — geolocation, VPN flagging, rate limiting — inherits the error. Audit this first before you touch your risk thresholds. It's the cheapest fix with the biggest blast radius.
Stop using IP reputation as a gate
The real design flaw in most fraud systems isn't that IP geolocation is imperfect — it's that teams treat an imperfect signal as a binary veto. "VPN detected → block" is a rule that will always sacrifice legitimate users at the margins, because the underlying classification is probabilistic, not certain.
A more honest approach treats IP reputation as one weighted input in a scoring model:
1def compute_risk_score(signals: dict) -> float:
2 score = 0.0
3
4 # IP reputation is a signal, not a verdict
5 if signals["ip_flagged_vpn"]:
6 score += 15 # not a dealbreaker on its own
7
8 if signals["new_device"] and signals["ip_flagged_vpn"]:The difference is huge in practice: "unknown IP + new device + impossible travel + failed payment history" is a strong signal. "IP flagged as VPN" alone is just noise dressed up as certainty.
What to actually do about it
- Validate your IP extraction path first. Confirm you're reading the real client IP, not your CDN or load balancer's address.
- Never gate high-value actions — checkout, login, account recovery — on IP reputation alone. Combine it with device fingerprinting, behavioral velocity, and account history.
- Segment your false-positive monitoring. Compare flag rates across mobile vs. fixed broadband and domestic vs. international traffic. If one segment gets flagged 5x more, that's your database's blind spot, not your users' behavior.
- Give blocked users a real path forward. A one-time SMS or email verification costs you almost nothing and turns a lost sale into a resolved one.
- Report bad mappings back to your vendor. ASN and subnet misclassifications persist until someone corrects them — that someone should be you, not just your customers filing support tickets.
Why this matters: every dollar you spend on a VPN-detection vendor is a bet that infrastructure-level signals can answer identity-level questions. They can't, not reliably, and the gap is widest for exactly the customers — mobile users, international users, CGNAT-heavy ISPs — who are least likely to be fraudsters and most likely to be annoyed enough to churn. Fix the plumbing (real client IP), fix the logic (scoring, not gating), and you'll catch more actual fraud while blocking far fewer Tuesday-afternoon Netflix watchers in Austin.
