I have a windows Server 2003 machine serving as a DNS server which I am using to override a number of DNS entries to route them to local IP addresses rather than public addresses. I can create a DNS entry (HOST / A) for www.foo.com, but I have been unable to figure out how to override the DNS entry for foo.com itself.

Here's what I have:

on public DNS servers foo.com and *.foo.com point to is a NAT device that is mapping to a machine in the local network

I'm trying to create a DNS entry inside of my network so that clients performing a lookup on foo.com that are using the local DNS server will resolve to instead of the public address (because I can't go "out and back" through the NAT device).

I have created a new zone in the DNS management snapin called "foo.com" and added a host entry for "www" with the correct IP address ( This seems to work correctly. However, when I try to add an entry for "" (no name) everything seems to work in the configuration UI and I get an entry with the name displayed as "(same as parent folder)" but the clients don't resolve this name.

Is there a way to accomplish what I'm trying to do?

  • You're doing it right. What do you mean "clients don't resolve this name"? They're getting back an NXDOMAIN response, or an incorrect response? – Evan Anderson Nov 30 '09 at 21:07
  • When I type "nslookup foo.com" I get: Server: UnKnown Address: <-- DNS server name Name: foo.com <!-- No address returned on the other hand "nslookup www.foo.com" gives: Server: UnKnown Address: Name: www.foo.com Address: – FooTheBar Nov 30 '09 at 22:39

I don't know the windows way to do this, but the BIND way to do it is:

[root@dhdx421 internal]# head -n 20 example.com
$TTL 21600      ; 6 hours
example.com              IN SOA  ns3.example.com. hostmaster.example.com. (
                                2009111201 ; serial
                                10800      ; refresh (3 hours)
                                3601       ; retry (1 hour 1 second)
                                259200     ; expire (3 days)
                                21600      ; minimum (6 hours)
                        NS      ns2.example.com.
                        NS      ns3.example.com.
$ORIGIN example.com.

The A record above is the example.com record. Specifying *.example.com means "anything".example.com, but "anything" can't be null as you've specified a "." and periods have special meaning in DNS.

Additionally, keep in mind that if you're overriding someone else's DNS, unless you setup forwarding properly, you will only be able to resolve the addresses that you've overridden (i.e., made your server authoritative for).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy