If you cannot use the IPFire Location database on your hosts, we offer a DNS service to query parts of the data just by sending a DNS query allowing to integrate this database into more applications.

Queries function on the principle of reverse lookups and are fast and globally cacheable. DNSSEC allows to trust the data just like a local database.

This is a new, experimental feature. The API, behaviour and format of the responses might be subject to change.

Query Country Codes - cc.location.ipfire.org

You can query the country code of an IP address.

$ dig +short TXT 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.2.b.0.8.7.6.0.1.0.0.2.cc.location.ipfire.org
"DE"

$ dig +short TXT 38.27.3.81.cc.location.ipfire.org
"DE"

Query Origins - origin.location.ipfire.org

You can query the origin of an IP address which will give you the AS number and name where that IP address originates from.

$ dig +short TXT 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.2.b.0.8.7.6.0.1.0.0.2.origin.location.ipfire.org
"AS204867 - Lightning Wire Labs GmbH"

$ dig +short TXT 38.27.3.81.origin.location.ipfire.org
"AS24679 - kyberio GmbH"

Query Prefixes - prefix.location.ipfire.org

You can query an IP address for the subnet it belongs to. This won't always match the announced route in the global routing table.

$ dig +short TXT 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.2.b.0.8.7.6.0.1.0.0.2.prefix.location.ipfire.org
"2001:678:b28::/48"

$ dig +short TXT 8.8.8.8.prefix.location.ipfire.org
"8.8.8.0/24"

Query AS Names - asn.location.ipfire.org

Resolve an AS number into a human-readable description.

$ dig +short TXT 204867.asn.location.ipfire.org
"Lightning Wire Labs GmbH"

$ dig +short TXT 3320.asn.location.ipfire.org
"Deutsche Telekom AG"

$ dig +short TXT 15169.asn.location.ipfire.org
"Google LLC"

Query Bogons - bogons.location.ipfire.org

Check if an IP address is considered being a bogon. That means that if an IP address is not part of the global routing table, we will return 127.0.0.2, otherwise we will return NXDOMAIN.

$ dig +short A 0.0.0.10.bogons.location.ipfire.org
127.0.0.2