What Is GeoIP?
GeoIP is a general term for technologies that estimate geographic location from an IP address. It is widely used by websites to determine a visitor's country or region and to optimize content for different locations.
The country, region, city, ISP, and AS number displayed on Kakunin-san's homepage are all retrieved using a GeoIP database.
How GeoIP Databases Work
A GeoIP database is a lookup table that maps IP address ranges to geographic information. It is built from the following data sources:
- IP address allocation data from RIRs (Regional Internet Registries): managed by ARIN (North America), RIPE NCC (Europe), APNIC (Asia-Pacific), and others
- ISP and data center location information
- BGP (Border Gateway Protocol) routing data
- User feedback and correction reports
- Wi-Fi access point and mobile base station location data
Major GeoIP Database Providers
- MaxMind GeoLite2 / GeoIP2: The most widely used GeoIP database, available in a free edition (GeoLite2) and a paid edition (GeoIP2)
- IP2Location: Provides high-accuracy location databases
- DB-IP: A GeoIP service offering both free and paid editions
Kakunin-san uses the MaxMind GeoLite2 database.
GeoIP Accuracy and Limitations
GeoIP accuracy varies significantly depending on the level of detail.
Country Level
Country-level accuracy is very high at 95–99%, correctly identifying the country for the vast majority of IP addresses.
Region and City Level
City-level accuracy ranges from about 50–80%, with errors of several tens of kilometers being common. For mobile connections or VPN-routed traffic, the reported location can differ substantially from the actual position.
Cases Where Accuracy Drops
- Mobile connections: Based on cell tower locations, accuracy decreases for IP addresses covering wide areas
- VPN or proxy connections: The VPN server's location is displayed instead
- Corporate networks: The headquarters' IP address may be used, differing from the actual office location
- Satellite internet: IP addresses may be assigned with no relation to the user's physical location
- CGN (Carrier-Grade NAT): When an ISP shares a single IP address among many users
Uses of GeoIP
Content Localization
Used to automatically switch language or currency based on the visitor's country.
Geographic Restrictions: Geo-Blocking
Used by streaming services and others to restrict access to specific countries due to licensing agreements.
Fraud Detection
Used to detect logins from unusual countries and flag potential unauthorized access.
Ad Targeting
Used to display region-specific advertisements.
Regulatory Compliance
Used to restrict service availability based on the laws of specific countries (e.g., online gambling regulations).
GeoIP and Privacy
Location estimation through GeoIP raises privacy concerns:
- Your approximate residential area can be inferred from your IP address alone
- ISP information reveals which internet service you use
- AS numbers can sometimes identify the organization you belong to
However, GeoIP cannot pinpoint your exact home address or identify you by name. The information remains at the "approximate area" level.
How to Hide Your Location
To avoid location estimation through GeoIP, you can use the following methods:
- Use a VPN: The VPN server's location is displayed, hiding your real location
- Use the Tor Browser: The exit node's location is displayed
- Route through a proxy server: The proxy's location is displayed
Check your IP address and location on Kakunin-san to verify that your location is properly hidden when connected through a VPN.