~/tools/ip-lookup

> ip lookup

look up any public ip: country, region, city, asn, isp, and hostname (reverse dns). backed by ipinfo.io — send an ip, get geolocation and network details.

## overview

an ip lookup takes an ipv4 or ipv6 address and resolves it to network and location metadata: the autonomous system number (asn) that owns the ip, the company or isp that announced it, the country/region/city from the geoip database, and optionally the reverse dns hostname. useful for debugging where a client actually came from, investigating suspicious traffic, figuring out which cloud provider an ip belongs to (aws ranges, google cloud, cloudflare), or confirming a cdn's pop. drwho.me forwards your query to ipinfo.io, which runs on its own infrastructure with the maxmind geoip database and public bgp/whois sources. results are as accurate as the geoip data — city-level at best, country-level reliably. private ip ranges (10.x.x.x, 192.168.x.x, 172.16-31.x.x, fd00::/8) return no useful geolocation because they are not routable on the public internet.

## how to use

  1. enter an ipipv4 (e.g. 8.8.8.8) or ipv6 (2606:4700:4700::1111). hostnames are not accepted — resolve them with the dns tool first.
  2. click lookupthe query is sent to ipinfo.io and the result returned.
  3. read the fieldscountry, region, city, org (asn + isp), hostname (reverse dns).
  4. interpret the asnas15169 is google, as32934 is meta, as13335 is cloudflare, as14061 is digitalocean, as16509 is aws.

## examples

$ example 1 — google public dns
$ in
8.8.8.8
# out
country us, city mountain view, org as15169 google llc, hostname dns.google
$ example 2 — cloudflare public dns — all 1.1.1.1s share the ip via anycast
$ in
1.1.1.1
# out
country au (anycast), org as13335 cloudflare, hostname one.one.one.one
$ example 3 — cloudflare ipv6
$ in
2606:4700:4700::1111
# out
same as 1.1.1.1 but ipv6

## common mistakes

  • anycastthe same ip can be advertised from many locations (google, cloudflare, major cdns). geoip returns one of the registered locations, not where your packet actually went.
  • accuracycity-level geoip is ~50-80% accurate for residential ips, far worse for mobile and corporate. country-level is ~99%.
  • private rangesrfc 1918 (10.*, 172.16-31.*, 192.168.*) and rfc 6598 (100.64.0.0/10 cgnat) are not routable. a lookup will say 'bogon' or return empty.
  • stale dataasn and whois updates lag reality. an ip may have changed owner days before public databases update.
  • rate limitsipinfo.io enforces free-tier rate limits. rapid repeated lookups may return 429.

## faq

does this store the ip i query?

we proxy the query to ipinfo.io and return the response. we do not store the query. ipinfo.io's privacy policy applies to their side.

what is asn?

autonomous system number — the id of the network that announces an ip range on the public internet. every isp, cloud provider, and large company has one or more asns.

how is this different from whois?

whois returns contact and administrative data for an ip block. ip lookup adds geoip, reverse dns, and convenience formatting. whois is the authoritative source; geoip is inferred.

can i look up a hostname?

not directly. resolve the hostname to an ip first using the dns tool, then run that ip through ip lookup.

what about my own ip?

use the 'what is my ip' tool — it reads your ip automatically without needing input.

can ai agents call this?

yes — ip_lookup on the mcp endpoint at drwho.me/mcp/mcp.

why is the city different from where the server is?

geoip resolves where the ip is registered, not where a physical server sits. cloud providers often register ip blocks to their head office while hosting them in a specific data center.

## related tools

  • what is my ip your public ip address, location, and timezone.
  • dns lookup resolve A, AAAA, MX, TXT, NS, or CNAME records via Cloudflare DoH.

## references

  1. RFC 1918 — private address space (ipv4)
  2. ipinfo.io — data source
  3. MaxMind GeoLite2 — geoip database
ad slot · tool-ip-lookup