~/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
- enter an ip — ipv4 (e.g. 8.8.8.8) or ipv6 (2606:4700:4700::1111). hostnames are not accepted — resolve them with the dns tool first.
- click lookup — the query is sent to ipinfo.io and the result returned.
- read the fields — country, region, city, org (asn + isp), hostname (reverse dns).
- interpret the asn — as15169 is google, as32934 is meta, as13335 is cloudflare, as14061 is digitalocean, as16509 is aws.
## examples
$ in
8.8.8.8# out
country us, city mountain view, org as15169 google llc, hostname dns.google$ in
1.1.1.1# out
country au (anycast), org as13335 cloudflare, hostname one.one.one.one$ in
2606:4700:4700::1111# out
same as 1.1.1.1 but ipv6## common mistakes
anycast— the 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.accuracy— city-level geoip is ~50-80% accurate for residential ips, far worse for mobile and corporate. country-level is ~99%.private ranges— rfc 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 data— asn and whois updates lag reality. an ip may have changed owner days before public databases update.rate limits— ipinfo.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.