I am testing a dynamic configuration of a nameserver on my local machine. I have a public domain (example.com) that I was trying to point its NS records to my private DNS but my registar does not support local ip addresses for NS records. I'm using the private DNS to map subdomains of example.com to internal ip addresses.

I'm hoping I can use dnsmasq have requests for example.com point at my custom namserver. I"m not sure how to configure it. Accepting other solutions than dnsmasq as well.


I have public domain example.com I have vagrant running bind9 at local ip I want to use the bind9 instance on vagrant as a nameserver form example.com that handles subdomain routing for *.example.com

So on my local machine I want any requests for *.example.com to hit the local bind9 instance and have that handle subdomains to local ip addresses

  • Can you post up some examples of what you want to do ? – Lawrence Feb 11 '14 at 7:18
  • 1
    See my answer on StackOverflow (though I expect it to be migrated here soon) – milli Feb 11 '14 at 18:23
  • @milli that looks like it will help me. One question though. How can I point my local machine to the bind server without touching my LAN router config? This is why I thought dnsmasq could help by just pointing to the bind server. – kevzettler Feb 13 '14 at 5:43
  • Hard-coding it on your local machines, but I'm not a fan of that. Best to fix up the nameservers handed out by DHCP. – milli Feb 13 '14 at 7:01

Assuming that your main domain settings are static/IP-based (e.g. the host IP's do not change), why not simply reproduce the external settings on your internal DNS?

Usually there wont be that many. Then just make sure that your internal DNS chains correctly.

| improve this answer | |
  • This sounds like it would help but I don't know how to do this. Can you give a more detailed example? – kevzettler Feb 11 '14 at 16:44
  • Simply use whatever tools you normally use to set up the local DNS with the same entries as you find on your public facing DNS. Then check that anything else is correctly chained out to the Internet (e.g. you can still ping google.com) – Julian Knight Feb 11 '14 at 16:53

Your Answer

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

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