Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

OpenDNS has a resource record setup so if you request that record it will return the IP address (ref).

So you can use a command like this host and the result you will get will be the IP address of computer you are using, or the public address used by the NAT you are behind.

What I would like to know is if there are any open source DNS servers that can perform this function as well.

share|improve this question

closed as off-topic by Zoredache, Ward, Michael Hampton Sep 25 '14 at 14:15

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

Warning, a DNS-based solution may give you the IP address of your resolver, not of your computer... – bortzmeyer Oct 11 '10 at 14:04
up vote 1 down vote accepted

Have you looked into PowerDNS and the "pipe" backend?

share|improve this answer
Nope, I wasn't aware that. That looks promising. – Zoredache Jul 14 '10 at 1:14

There's a plugin in my evldns framework that can do this.

The chaos demo will answer for queries for client.bind with the client's IP address, in either A, AAAA or TXT format as applicable.

share|improve this answer

That's a non-standard RR. If you want to do something more-or-less portable, take a look at the STUN protocol. It's pretty ghastly but at least it's standard and was designed specifically for the purpose of allowing a host to discover its own IP address and port, as seen by a STUN server. There are public STUN servers available, listed here: The same web page has pointers to client libraries and server software.

The advantage of the DNS-based approach is that you can use tools you've already got. But because it's non-standard it's not portable.

share|improve this answer
A A or AAAA RR cannot be considered as "non standard". – bortzmeyer Oct 11 '10 at 14:02
+1 for STUN, though, which is indeed the proper solution. – bortzmeyer Oct 11 '10 at 14:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.