Skip to content

ipasn.net DNS tricks

source for the things below: https://blog.apnic.net/2026/02/09/from-the-stupid-dns-tricks-department-ipasn-net/

  • Query an IPv4 prefix directly (no octet-reversal) to get compact origin-ASN mapping data from ipasn.net
dig +short TXT 216.88.0.0.origin.asn.ipasn.net
  • Query an IPv6 prefix directly to get compact origin-ASN mapping data for IPv6
dig +short TXT 2401:2000:6660::.origin6.asn.ipasn.net
  • Get the full enriched record for an IP (BGP visibility, prefix, ASN, org, country, RIR, registration, and RPKI fields)
dig +short TXT 216.88.0.0.ipasn.net
  • Request the same enriched IP record as JSON-formatted TXT output for easier machine parsing
dig +short TXT 216.88.0.0.json.ipasn.net
  • Resolve a hostname through the ipasn.net DNS backend and return an enriched record for the default address family
dig +short TXT www.potaroo.net.dns.ipasn.net
  • Resolve a hostname but force IPv4 (A) lookup
dig +short TXT www.potaroo.net.a.dns.ipasn.net
  • Resolve a hostname but force IPv6 (aaaa) lookup
dig +short TXT www.potaroo.net.aaaa.dns.ipasn.net
  • Query a single attribute (cc) to return only the country code for an IP
dig +short TXT 216.88.0.0.cc.ipasn.net
  • Query a single RPKI-focused attribute (rpki) for concise validation/prefix/AS/TAL details
dig +short TXT 216.88.0.0.rpki.ipasn.net