IP Intelligence Against Cybercrime: How to Prevent Cyber Attacks
IP intelligence against cybercrime: which ASN, VPN, Tor and hosting signals stop which attacks, with tested Python for 7 defenses and real lookups from today.

When we looked up three public addresses on 15 October 2026, a probe-confirmed commercial VPN server scored 92 (block), a Tor exit scored 100 (block), and Nmap's own test host on a Linode cloud server scored 10 (allow). All three sit in data centers, yet only the two anonymizers were blocked. That gap between "cloud" and "criminal" is what the rest of this guide is about.
The stakes are measured, not projected. The FBI's Internet Crime Complaint Center received 1,008,597 complaints in 2025, the first year above a million, with $20.877 billion in reported losses, up 26% on 2024 (IC3 2025 Internet Crime Report). And the traffic carrying attacks is increasingly not human: Imperva's 2026 Bad Bot Report found automated traffic made up more than 53% of all web traffic in 2025, up from 51% the year before.
This guide covers what the signals are, which crime categories they disrupt, seven defenses with Python we tested against real addresses today, a signal-to-attack matrix, and the cases where IP data has nothing to say.

What IP intelligence adds to a bare address
IP intelligence is the enrichment of a raw IP address with everything it reveals about its origin and trustworthiness. A bare address is just a number. Run it through an enrichment pipeline and it becomes a profile:
- Geolocation: country, region, approximate city, and timezone.
- Network ownership: the Autonomous System Number (ASN) and the organization that controls the address space.
- Connection type: residential broadband, mobile, business, or hosting and datacenter.
- Anonymizer flags: is this a VPN, proxy, or Tor exit node?
- Threat and abuse signals: has this address been seen scanning, spamming, or on a DNS blocklist?
- A composite risk score: one number that fuses the signals above into an allow, review, step-up or block decision.
The distinction that trips people up: this is not the same as IP geolocation. Geolocation answers only "where is this IP," and as we cover in how accurate IP geolocation actually is, it's most reliable at the country level but far weaker at city level. The broader discipline, which we break down layer by layer in our guide to what IP intelligence covers beyond location, adds the network, connection-type, anonymizer and reputation layers that answer the question fraud and security teams actually care about: can I trust this connection? Most implementations read only the country field, and the country field alone says almost nothing about whether a request is legitimate.
Why the source IP is the first signal in a cybercrime defense
The source IP is the first signal because an attacker can fake almost everything else but has to show you a routable address. Three structural facts make it valuable.
1. It is unavoidable. An attacker can spoof a User-Agent, fabricate an email, buy a stolen card, and forge a device fingerprint. What they cannot do is reach your server without a source IP you get to observe. They can hide behind infrastructure, but the infrastructure itself leaves tells.
2. Attackers reuse infrastructure at scale. Profitable cybercrime is industrialized. Credential-stuffing kits hammer thousands of accounts from rented servers; card-testing rings cycle through datacenter ranges; scrapers and scalpers run from cloud and proxy pools. That reuse is exactly what network signals expose: a login from a hosting ASN, a checkout from a datacenter range, a "shopper" arriving over an open proxy.
3. It is available before the costly step. The IP is present at the very first packet, before authentication and before payment authorization. That makes it the cheapest place to triage risk, so your expensive defenses (MFA challenges, manual review, step-up KYC) fire only when they're warranted.
The catch, which we come back to below, is that the IP is a signal, not a verdict. The skill is using it to decide who deserves more scrutiny, not to issue blanket bans.
The cybercrime categories IP signals disrupt
Cybercrime isn't one thing, so neither is the IP's role in stopping it. Here's how the source IP contributes across the major attack categories, with the deep-dive guide for each.
Account takeover and credential stuffing
Credential stuffing (replaying leaked username and password pairs against login forms) is now the dominant path to account takeover. The attack is only economical because it's automated and distributed across cheap infrastructure. A lookup flags the hosting ASNs, proxies, and anonymized exits that volumetric stuffing rides on, and feeds a velocity picture (how many accounts is this IP touching?) that a single login can't reveal. The nuance: IP blocking alone fails, because sophisticated actors move to residential proxies, so the IP has to be a risk input, not the whole decision.
Payment fraud, card testing and checkout abuse
The checkout is where cybercrime converts to cash, which is why it draws carding bots, card-testing scripts, and, increasingly, automated AI shopping agents. Card testing runs as high-velocity, low-value authorizations, often from datacenter and proxy IPs. Connection-type and risk signals let you raise friction on the suspicious minority of checkouts while leaving legitimate sessions (including good agent traffic) untouched. Where to draw the line is answered in what IP fraud score you should block at.
Bots, scrapers and crawler impersonation
With bots now the majority of web traffic, telling a real crawler from an impersonator matters at every endpoint. A User-Agent: GPTBot header is a claim anyone can send. HUMAN Security found 5.7% of all observed traffic presenting an AI crawler or scraper user agent was spoofed. The defense is provenance: verifying AI crawlers and agents by IP using reverse DNS, published CIDR ranges, and Web Bot Auth. A lookup can't see the User-Agent, so the comparison between the claimed name and threat.crawler.verified happens in your code. For the wider picture, see how IP data sorts bots into classes, and for scrapers copying your content or prices, our web scraping detection guide.
Anonymization abuse: VPNs, proxies and Tor
Anonymization is the cybercriminal's camouflage, but it's also used by millions of perfectly legitimate, privacy-conscious people. Modern VPN and proxy detection separates the two using provider server lists, ASN analysis, and active protocol probing rather than a stale blocklist. The most dangerous flavor is the residential proxy: networks that route traffic through real consumer devices. Infoblox measured DNS queries to residential proxy domains growing from nearly 400 billion a month in January 2025 to over 500 billion a month by April 2026. IP data alone can't reliably flag them, and GeoIPHub does not detect residential proxies, so they have to be caught with device, behavioral, and velocity signals. Handling anonymized traffic without turning away legitimate VPN users is the subject of detecting anonymized traffic without blocking real customers.
Fake accounts, synthetic identity and new-account fraud
Bonus abuse, referral farming, money-muling, and synthetic-identity rings all depend on creating accounts at scale. Because each fake account needs a "fresh-looking" origin, attackers churn through proxy and datacenter IPs, which is exactly the infrastructure these signals surface. Folding the risk score into signup is one of the cheapest ways to raise the cost of mass account creation. Our signup check by IP type shows what each kind of address returns and what to do with it.
Geo-fraud, location spoofing and sanctions evasion
Promotion abuse, content-licensing circumvention, and sanctions evasion all hinge on faking a location. Here the lookup does double duty: geolocation establishes the claimed location, while VPN, proxy and connection-type flags reveal whether that location is being spoofed. The geo-restriction defense below shows why the country check means nothing without the anonymizer check next to it.
Three lookups from 15 October: VPN 92, Tor exit 100, cloud host 10
The score follows the evidence, not the network type. We ran these three lookups on 15 October 2026 against the public endpoint (no key needed, 30 lookups a minute), and the responses below are trimmed copies of the real output. Results change as ranges move.
curl https://api.geoiphub.com/v1/lookup/102.129.235.17
{
"ip": "102.129.235.17",
"asn": {
"asn": 834,
"org": "IPXO - IPXO LLC",
"asn_type": "vpn",
"connection_type": "datacenter"
},
"detection": {
"is_vpn": true,
"is_hosting": false,
"is_anonymous": true,
"vpn_provider": "none",
"vpn_confidence": 100
},
"scoring": {
"fraud_score": 92,
"recommended_action": "block",
"detection_methods": ["known_vpn_server", "openvpn_open", "ipsec_open"]
}
}
{
"ip": "185.220.101.47",
"asn": {
"asn": 60729,
"org": "TORSERVERS-NET - Stiftung Erneuerbare Freiheit",
"asn_type": "hosting",
"connection_type": "datacenter"
},
"geo": {
"country_code": "DE",
"city": "Hamburg (Hamburg-Nord)"
},
"detection": {
"is_tor": true,
"is_hosting": true,
"is_anonymous": true
},
"threat": {
"is_spammer": true,
"threat_types": ["spammer", "tor"],
"dnsbl_sources": ["bl.spamcop.net"]
},
"scoring": {
"fraud_score": 100,
"recommended_action": "block",
"detection_methods": ["tor_exit", "datacenter_blocklisted", "no_ptr_datacenter", "known_spammer"]
}
}
{
"ip": "45.33.32.156",
"asn": {
"asn": 63949,
"org": "AKAMAI-LINODE-AP - Akamai Connected Cloud",
"asn_type": "hosting",
"connection_type": "datacenter"
},
"detection": {
"is_vpn": false,
"is_hosting": true,
"is_anonymous": false
},
"scoring": {
"fraud_score": 10,
"recommended_action": "allow",
"detection_methods": ["datacenter_ip"]
}
}
On 15 October the VPN server's detection_methods showed three confirmations: the IP was flagged as a VPN server, and our probes completed real OpenVPN and IPsec handshakes on it. That corroboration pushed it into the block band, even though vpn_provider was "none" because the address was on no provider's list. Our scoring changed on 10 November 2026: a VPN found only by our handshake now gets vpn_service_unattributed instead of known_vpn_server, protocol signals count a quarter on an address already flagged as a VPN, and a VPN with no abuse, proxy or Tor evidence stops at 70, step_up. By 11 November this address returned 0, allow, with no evidence on record. The Tor exit stacks the Tor Project's exit list with a SpamCop listing, so it hits the ceiling of 100.
One method in the Tor response is weaker than it looks. no_ptr_datacenter says the address has no reverse DNS, yet a live dig -x we ran the same morning returned a hostname for it. Our stored PTR data has gaps on some addresses, so give that method the least weight when you review this verdict.
Nmap's test host carries only the hosting signal, so it scores 10 and gets allow. Plenty of legitimate APIs, monitors and AI agents run on cloud servers, and hosting alone is not evidence of crime. Even the VPN's block on that date was a default you can override per flow, as the defenses below show.
Why a risk score beats a blocklist
A score beats a blocklist because the IP is a signal, not a verdict. A single residential IPv4 can be shared by hundreds of people behind carrier-grade NAT, so a real customer and a fraudster can sit on the same address. A pristine residential IP can host a proxy. A datacenter IP can belong to a legitimate corporate VPN.
The durable pattern is to convert IP signals into a risk score, then route the decision on it:
Incoming request
|
v
[ IP lookup ] ASN, connection type, VPN / proxy / Tor, hosting, reputation
|
v
[ Risk score 0-100 ] fuse with device, behavioral, velocity and identity signals
|
+-- low : allow (don't punish the legitimate majority)
+-- medium : step-up / challenge (MFA, CAPTCHA, manual review)
+-- high : block or hold
This is the difference between blocklisting IPs (brittle, high false-positive, easily evaded) and risk-scoring connections (graduated, explainable, resilient). Every reason an explainable score can name, with its weight, is listed in risk score reasons, field by field.
How to prevent cyber attacks with IP geolocation and network signals
You prevent cyber attacks with IP geolocation by reading more than the country: the geo, asn, detection, threat and scoring groups of one lookup each drive a different defense. The seven below are the ones we see most, each with Python you can paste. They all call one small helper:
import json
import urllib.request
API = "https://api.geoiphub.com/v1/lookup/"
def geoiphub_lookup(ip: str, api_key: str = "") -> dict:
# The API currently answers 403 to urllib's default User-Agent, so send your own.
# Without a key you get 30 lookups a minute; with one, 1,500 a day on the free tier.
headers = {"User-Agent": "my-app/1.0"}
if api_key:
headers["x-api-key"] = api_key
req = urllib.request.Request(API + ip, headers=headers)
with urllib.request.urlopen(req, timeout=5) as resp:
return json.load(resp)
1. Block known abuse at the edge, but let verified crawlers through
The cheapest defense rejects scanners, botnet nodes and Tor exits before they touch your application, and hands everything else to the score. Two details matter. Verified crawlers come first, because a real one can sit on a blocklisted range (AhrefsBot's 5.39.1.230 returns is_abusive: true). And the scanner flag is read directly, because it doesn't move fraud_score: the Censys scanner at 162.142.125.10 scores 0.
def check_ip_at_entry(ip: str) -> dict:
data = geoiphub_lookup(ip)
threat, scoring = data["threat"], data["scoring"]
# Verified search and AI crawlers can sit on blocklisted ranges: let them through
if threat["crawler"]["verified"]:
return {"action": "allow", "reason": "verified_crawler"}
# Scanner and botnet flags don't move fraud_score, so read them directly
if threat["is_scanner"] or threat["is_botnet"]:
return {"action": "block", "reason": "scanner_or_botnet"}
# Tor exit at an entry point that handles accounts or money
if data["detection"]["is_tor"]:
return {"action": "block", "reason": "tor_exit"}
return {"action": scoring["recommended_action"], "fraud_score": scoring["fraud_score"]}
Calibrate by flow. A password reset form can act on step_up, while a public content endpoint might only act on block. The scoring.confidence field (0.0 to 1.0) says how much evidence sits behind the score, so keep hard blocks for verdicts with strong evidence.
2. Treat VPN, proxy and Tor traffic by flow
Anonymizers deserve different treatment per flow, because commercial VPNs carry millions of ordinary users while open proxies and Tor exits at a checkout rarely belong to one. Blocking every VPN is too broad for most products.
SENSITIVE_FLOWS = {"login", "signup", "checkout"}
def anonymization_response(ip: str, flow: str) -> str:
det = geoiphub_lookup(ip)["detection"]
sensitive = flow in SENSITIVE_FLOWS
if det["is_tor"] or det["is_proxy"]:
return "block" if sensitive else "challenge"
# Commercial VPNs carry millions of ordinary users: add friction only where money moves
if det["is_vpn"]:
return "challenge" if flow == "checkout" else "allow_and_log"
# iCloud Private Relay is a Safari setting, not an attack tool
return "allow"
The evidence behind each flag:
detection.is_vpn: a match against the providers' own server lists plus a public third-party list (including the WireGuard tag those lists carry), and real OpenVPN and IPsec handshakes from our probes.detection.is_proxy: handshake probes for SOCKS4, SOCKS5, HTTP CONNECT and HTTP forward proxies.detection.is_tor: the Tor Project's official exit list, refreshed daily.detection.is_relay: iCloud Private Relay and Cloudflare privacy egress, which we let through on purpose.
Residential proxies are not on this list. The API doesn't detect them, so don't build a rule on is_residential_proxy.
3. Enforce geo-restrictions only with VPN detection
Geo-restriction works only when the country check and the anonymizer check run together. If you block a sanctioned country but allow is_vpn: true requests, users there connect through a VPN server in Germany and the block fails.
BLOCKED_COUNTRIES = {"KP", "IR", "CU"} # example only: your compliance team owns this list
RESTRICTED_FLOWS = {"checkout", "download", "api_access"}
def check_geo_compliance(ip: str, flow: str) -> dict:
if flow not in RESTRICTED_FLOWS:
return {"action": "allow"}
data = geoiphub_lookup(ip)
det = data["detection"]
# Behind an anonymizer the apparent country is the server's, not the user's
if det["is_anonymous"]:
return {"action": "block", "reason": "country_unverifiable"}
# Relay geolocation is approximate: confirm the country from Apple's egress list
if det["is_relay"]:
return {"action": "verify_country", "reason": "private_relay"}
if data["geo"]["country_code"] in BLOCKED_COUNTRIES:
return {"action": "block", "reason": "geo_compliance"}
return {"action": "allow"}
The relay branch is there because of a gap we found in our own data. Apple keeps Private Relay egress in the user's country, but for the relay address 104.28.46.99 our database says Angola while Apple's own egress list says Zambia. A relay reports is_anonymous: false, so without that branch the country check would trust the wrong answer.
4. Flag impossible travel on logins
Impossible travel is one of the most reliable account-takeover signals: nobody logs in from London and then from California 30 minutes later. Store the coordinates of each login, compute the distance to the previous one, and flag pairs that would need a jet faster than about 900 km/h.
import math
from datetime import datetime, timezone
MIN_DISTANCE_KM = 500 # below this, city-level geolocation error can fake a "jump"
MAX_SPEED_KMH = 900 # roughly a commercial jet
def haversine_km(lat1, lon1, lat2, lon2) -> float:
r = 6371
dlat = math.radians(lat2 - lat1)
dlon = math.radians(lon2 - lon1)
a = (math.sin(dlat / 2) ** 2
+ math.cos(math.radians(lat1)) * math.cos(math.radians(lat2)) * math.sin(dlon / 2) ** 2)
return r * 2 * math.asin(math.sqrt(a))
def check_impossible_travel(previous, current_ip: str) -> dict:
# previous: your last stored login for this user, e.g.
# {"latitude": 51.5, "longitude": -0.12, "at": datetime(..., tzinfo=timezone.utc)}
data = geoiphub_lookup(current_ip)
det, geo = data["detection"], data["geo"]
# A VPN, Tor or relay location is not where the person is: don't compare it or store it
if det["is_anonymous"] or det["is_relay"]:
return {"action": "skip", "reason": "location_not_reliable"}
if previous is None:
return {"action": "allow"}
distance_km = haversine_km(previous["latitude"], previous["longitude"],
geo["latitude"], geo["longitude"])
hours = (datetime.now(timezone.utc) - previous["at"]).total_seconds() / 3600
if distance_km > MIN_DISTANCE_KM and hours < distance_km / MAX_SPEED_KMH:
return {"action": "step_up", "reason": "impossible_travel",
"distance_km": round(distance_km), "hours_elapsed": round(hours, 1)}
return {"action": "allow"}
With a stored London login from 30 minutes earlier, the Linode host in Fremont came back step_up at 8,617 km. Two calibration notes. VPN users trip impossible travel every time they switch servers, which is why anonymized logins are skipped rather than stored. And mobile carriers route many users through shared addresses with coarse city data, so the 500 km floor keeps location drift from looking like a flight.
5. Throttle by network type
Rate limits work better when they follow the network behind the IP. One mobile address can carry hundreds of real people behind carrier NAT, so throttling it hard blocks customers. A cloud address is usually one script, though sometimes it is an AI agent acting for a real buyer, so challenge it rather than banning it.
RATE_LIMITS = {
"isp": {"per_minute": 60, "on_exceed": "delay"},
"mobile": {"per_minute": 120, "on_exceed": "delay"}, # carrier NAT puts many people on one IP
"hosting": {"per_minute": 10, "on_exceed": "challenge"}, # usually one script, sometimes a real AI agent
"vpn": {"per_minute": 20, "on_exceed": "challenge"},
}
DEFAULT_LIMIT = {"per_minute": 30, "on_exceed": "delay"} # "unknown" and any new type
def rate_limit_for(ip: str) -> dict:
data = geoiphub_lookup(ip)
if data["threat"]["crawler"]["verified"]:
return {"per_minute": 120, "on_exceed": "delay"}
if data["scoring"]["recommended_action"] == "block":
return {"per_minute": 3, "on_exceed": "block"}
return RATE_LIMITS.get(data["asn"]["asn_type"], DEFAULT_LIMIT)
The numbers are starting values to tune against your own traffic, not measured optima. Keep a default: the Censys scanner came back with asn_type: "unknown", which no fixed table would list. Scrapers that rent home and mobile IPs slip past any network-type rule, and our guide on how to tell if your site is being scraped covers the log-level checks that catch them.
6. Compare the IP country with the billing country at checkout
A card with a UK billing address used from an IP in another country is a high-signal pattern for payment fraud, as long as you can trust the IP's country. When an anonymizer hides it, ask for 3-D Secure (3DS) authentication instead.
def assess_checkout_geo_risk(ip: str, billing_country: str) -> dict:
data = geoiphub_lookup(ip)
det = data["detection"]
if det["is_vpn"] or det["is_proxy"] or det["is_tor"]:
return {"risk": "high", "reason": "anonymizer_hides_country", "action": "require_3ds"}
# Private Relay keeps the user's country but our relay geolocation can miss it: skip the compare
if det["is_relay"]:
return {"risk": "standard", "reason": "private_relay", "action": "allow"}
ip_country = data["geo"]["country_code"]
if ip_country != billing_country:
return {"risk": "elevated", "reason": f"ip_{ip_country}_billing_{billing_country}",
"action": "require_3ds"}
return {"risk": "standard", "action": "allow"}
Don't maintain a hand-written list of "risky countries." Attackers deliberately route through clean-looking IPs in low-risk countries, so target the infrastructure (anonymizer status, abuse flags, ASN type) rather than the geography it appears to come from. Our chargeback reduction guide goes further on the checkout flow.
7. Keep bot sessions out of analytics
Filtering automated sessions before they register in analytics keeps your conversion data, and any bidding model trained on it, about real people. Verified crawlers still get served; they just aren't counted.
def should_record_session(ip: str) -> bool:
data = geoiphub_lookup(ip)
det, threat, scoring = data["detection"], data["threat"], data["scoring"]
if threat["crawler"]["verified"]:
return False # serve the crawler, but keep it out of analytics
if det["is_tor"] or det["is_proxy"]:
return False
if scoring["recommended_action"] == "block":
return False
if det["is_hosting"] and scoring["fraud_score"] > 50:
return False
return True
Paid traffic has its own playbook, which starts by giving up on the IP exclusion list: see how to detect click fraud by IP address.
What the seven checks returned for six real addresses
We ran every function above, exactly as published, against six public addresses on 15 October 2026. The checkout line compares each IP with a US billing address.
185.220.101.47 (Tor exit)
- Edge check: block: tor_exit
- Login anonymizer: block
- Rate limit: 3/min, block
- Checkout vs US card: high: require_3ds
- Count in analytics: no
102.129.235.17 (commercial VPN)
- Edge check: block: score 92
- Login anonymizer: allow_and_log
- Rate limit: 3/min, block
- Checkout vs US card: high: require_3ds
- Count in analytics: no
45.33.32.156 (Nmap test host, Linode)
- Edge check: allow: score 10
- Login anonymizer: allow
- Rate limit: 10/min, challenge
- Checkout vs US card: standard: allow
- Count in analytics: yes
162.142.125.10 (Censys scanner)
- Edge check: block: scanner_or_botnet
- Login anonymizer: allow
- Rate limit: 30/min, delay
- Checkout vs US card: standard: allow
- Count in analytics: yes
5.39.1.230 (AhrefsBot, verified)
- Edge check: allow: verified_crawler
- Login anonymizer: allow
- Rate limit: 120/min, delay
- Checkout vs US card: elevated: FR vs US
- Count in analytics: no
104.28.46.99 (iCloud Private Relay)
- Edge check: allow: score 9
- Login anonymizer: allow
- Rate limit: 30/min, delay
- Checkout vs US card: standard: private_relay
- Count in analytics: yes
Two entries show why the checks have to run together. The Censys scanner passes every check except the edge one, because the scanner flag is its only signal. And the VPN that the edge check blocks on score alone only gets logged at login, which is the per-flow behavior you want: block it where you hard-block on score, and log it where a VPN is normal.
Which IP signal stops which attack
Each signal maps to a distinct attack and a distinct action. Use this as the starting configuration, then tune per flow.

detection.is_tor: true
- What it catches: Tor anonymization in credential stuffing, carding and fraud
- Recommended action: Block in sensitive flows
detection.is_proxy: true
- What it catches: Open SOCKS or HTTP proxy, usually abuse tooling
- Recommended action: Block in login, checkout, signup
detection.is_vpn: true
- What it catches: Commercial VPN, mixed legitimate and abusive use
- Recommended action: Challenge at checkout; allow and log elsewhere
detection.is_relay: true
- What it catches: iCloud Private Relay or Cloudflare privacy egress
- Recommended action: Allow; don't trust its city
detection.is_hosting: true at a consumer flow
- What it catches: Scripts, or an AI agent buying for a real person
- Recommended action: Challenge; block only with a high score
threat.is_scanner or is_botnet: true
- What it catches: Scanning and botnet infrastructure (doesn't move the score)
- Recommended action: Block at the edge
threat.crawler.verified: true
- What it catches: A real search or AI crawler on its operator's published ranges
- Recommended action: Allow; exclude from analytics
Distance over 500 km faster than 900 km/h
- What it catches: Account takeover with stolen credentials
- Recommended action: Step up, then flag the account
geo.country_code differs from billing, no anonymizer
- What it catches: Card testing, or a customer on holiday
- Recommended action: Require 3DS
scoring.fraud_score over 75 (block)
- What it catches: Several corroborating signals at once
- Recommended action: Block or hold for manual review
What IP data cannot catch
IP data is a first-pass filter, and three kinds of attack go straight through it. For the per-incident procedure, from ownership to verdict, see how to investigate a suspicious IP address.
Residential proxies with clean reputations. An IP added to a proxy pool yesterday has no abuse history and passes blocklist checks, and GeoIPHub does not detect residential proxies. Catching them takes device fingerprint anomalies, session timing and interaction rates.
Compromised accounts on a clean connection. An attacker with valid credentials on a home connection in the victim's country leaves nothing in the IP data to flag. Behavioral signals (typing rhythm, navigation, purchase history divergence) are needed.
Targeted attacks. An attacker who researches your defenses will pick a clean residential IP in the victim's city and pass every IP-level check. Email verification and device binding are the defenses here.
The right model: the lookup filters the volume of automated and low-sophistication attacks at near-zero cost per request, so that expensive checks (device fingerprinting, behavioral analysis, manual review) can focus on what's left.
Running these checks in production
Three habits keep IP-based defenses accurate after launch.
Cache per IP, briefly. Network facts change slowly within a session but do change: our VPN probes run at most every 12 hours, our proxy checks at most every 6 hours, and threat feeds refresh every 6 hours. Cache each lookup for the session, expire it within an hour for security decisions, and within a day for plain geo fields. One lookup per IP per session is the practical cost model.
Log the full response, not just the verdict. When a block fires, you want to know which signal triggered it. Store scoring.detection_methods and the raw scoring.fraud_score with every decision. That is how you find false positives, such as the stale PTR method in the Tor sample above, and tune thresholds.
Tune thresholds per flow, not per site. A password reset deserves a lower block threshold than a blog read. Keep thresholds in configuration so your security team can adjust them without a deployment:
FLOW_THRESHOLDS = {
"checkout": {"block_above": 75, "challenge_above": 50},
"login": {"block_above": 80, "challenge_above": 55},
"signup": {"block_above": 85, "challenge_above": 60},
"api_read": {"block_above": 90, "challenge_above": 75},
}
What one GeoIPHub lookup returns against each threat
GeoIPHub packages this whole layer into a single API call. One lookup returns over 100 data fields across 10 response groups (geolocation, ASN and network, connection type, mobile carrier, reverse DNS, anonymizer flags, and a calculated risk score), so you don't stitch together five vendors to answer one question. Here's what's doing the work against each threat:
- A 0-100 risk score from 40 weighted reasons. Rather than a yes or no flag, GeoIPHub returns an explainable score with built-in decision bands, allow (25 or less), review (50 or less), step-up (75 or less), and block (over 75), so the same lookup can be tuned tighter at checkout than at login.
- VPN and proxy detection by active probing. Beyond static lists, GeoIPHub runs real handshake probes across 25+ ports and 8 protocols, and cross-references the VPN providers' own server lists plus a public third-party list, so the answer reflects live infrastructure, not last month's blocklist.
- Datacenter and hosting detection. Coverage spans 853 curated hosting ASNs plus official ranges from 10 cloud providers, the signal that exposes carding bots, scrapers, and stuffing infrastructure posing as browsers.
- Daily-refreshed Tor exit data and 19 official crawler and AI-bot range feeds (Googlebot, GPTBot, ClaudeBot, PerplexityBot and more), so anonymized exits and self-identified bots are scored against current ground truth.
- 30+ data sources and 5 RIR WHOIS feeds behind it all, with sub-millisecond cached lookups and unknown IPs classified live in under 2.5 seconds, fast enough to sit inline at login, signup, and checkout.
It's also privacy-respecting by construction: you send only the IP you want classified and get back network and risk attributes. No names, emails, or payment data are needed to score a request.
You can try the signals directly with the free IP lookup tool, check any IP's fraud score, or test VPN detection on your own connection. When you're ready to wire it into your app, the 10-minute integration guide walks through scoring every request with cURL, Node, and Python, on a free tier that returns every field, 1,500 lookups a day, with no field gating.
Raise the attacker's cost, not your customers' friction
Cybercrime is industrialized, automated, and increasingly non-human, and every bit of it travels over an IP address you get to inspect first. IP data won't stop fraud by itself, and any honest treatment of it says so. But as the provenance layer in a layered defense (the signal that tells you which sessions deserve a closer look), it is one of the most useful, lowest-friction controls you can deploy. Used well, it raises the cost of attack for the criminal minority without taxing the legitimate majority.
FAQ
What is IP intelligence?
IP intelligence is the practice of enriching a raw IP address with everything it reveals about its origin and trustworthiness: geolocation, the owning network (ASN), connection type, whether it is a datacenter, VPN, proxy, or Tor exit, abuse history, and a calculated risk score. It turns the single most universal attribute of any online request into a decision signal you can act on before a password is typed or a card is charged. It is broader than IP geolocation, which only answers "where is this IP"; the enrichment also answers "can I trust it."
How does IP data help prevent cyber attacks?
Nearly every attack (credential stuffing, card testing, scraping, fake-account creation, fraudulent checkout) arrives over an IP address, and attackers reuse infrastructure at scale. A lookup exposes the tells that infrastructure leaves behind: a login from a hosting ASN, a checkout from a probe-confirmed VPN server, a "browser" that is actually a cloud script. Used as a real-time risk signal at login, signup, and checkout, it lets you challenge or block the suspicious minority without adding friction for the legitimate majority.
Can IP geolocation alone stop cyber attacks?
No, and any vendor claiming it can is overselling. IP data is one layer in a defense-in-depth model. A shared mobile IP can carry both a fraudster and a real customer, a clean residential IP can host a proxy, and an attacker with stolen credentials on a home connection in the victim's city passes every IP check. IP signals are strongest combined with device, behavioral, velocity, and identity signals. Use the risk score to decide which sessions deserve more scrutiny, not to issue blanket blocks.
What types of cybercrime can IP signals detect?
IP signals contribute to detecting account takeover and credential stuffing, new-account and synthetic-identity fraud, payment and card-testing fraud, automated bot and scraper traffic, crawlers that claim a name their IP doesn't back up, and policy or sanctions evasion via VPNs and proxies. In each case they are the provenance layer: they tell you whether the connection comes from infrastructure consistent with a real person or with automated or anonymized activity. They do not catch residential proxies; those need device and behavioral signals.
What is impossible travel detection and how does it work?
Impossible travel detection flags two logins to the same account from places too far apart to cover in the time between them. London and Singapore are about 10,850 km apart, so a London login followed by a Singapore login 30 minutes later means one of them is not the account owner. Store the latitude and longitude of each login, compute the distance to the previous one, and flag pairs that would need more than about 900 km/h, roughly a commercial jet. Skip logins from VPN, Tor or relay addresses, because their location is not the user's.
Should I block all traffic from certain countries?
Country-level blocking is a blunt instrument with significant collateral damage. Before blocking an entire country, check whether you have legitimate users there, because a block you set once will also hit them. More targeted alternatives: require step-up verification for sensitive flows such as payment and password reset, use hard geo-restriction only where law or contract requires it, and combine country with network signals (hosting ASN, VPN detection) so you target the infrastructure being abused rather than the population it appears to come from.
Is IP intelligence the same as IP geolocation?
No. IP geolocation is a subset. Geolocation maps an IP to a country, region, and approximate city, and is most reliable at the country level but far weaker at city level. The full lookup includes geolocation but adds network ownership (ASN), connection type, VPN, proxy, Tor and datacenter flags, abuse signals, and a composite risk score. Geolocation tells you where; the rest tells you whether to trust it.
Does IP-based risk scoring violate user privacy or GDPR?
It operates on the IP address and network metadata, not on names, emails, or payment details. With GeoIPHub you send only the IP you want classified and receive back network and risk attributes. No personal data exchange is required to score a request. Under GDPR an IP address can be personal data, so the right practices still apply: use it for the legitimate purpose of fraud prevention and security, minimize retention, and document it. Scoring an IP for risk is a security control, not user tracking.
The team behind the GeoIPHub API
Written by the GeoIPHub team, the people who build the GeoIPHub IP intelligence API and its scanner. Drafts are prepared with AI assistance and edited by the team; API examples are real lookups against the live API unless labelled illustrative.


