Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using OS X Mountain Lion. I'm using dnsmasq to set up wildcard localhost domain names, such as http://local.dev, to point to localhost. But I have to add 127.0.0.1 in my system preference -> network settings.

After I set up 127.0.0.1 as the DNS server, the ISP's default DNS servers were over wrote by mine. This was preventing me from accessing websites. It's not a big deal when I don't move my computer, I could manually enter the ISP's DNS server. But if I change places, the ISP's DNS changes.

I also tried to use google's DNS server, but it's not working in some instance. How can I reserve (or update) the ISP's DNS server without deleting 127.0.0.1 as a DNS.

Thank you in advance.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I believe if you want to point http://local.dev to your localhost, you have to add entry into /etc/hosts file and not DNS. 127.0.01 is loopback interface.

share|improve this answer
    
This is a good solution, but if I want to support wildcard DNS resolution hosts file cannot do it. –  Daiwei Mar 26 '13 at 7:28
    
I assume you want to build local development system. So my method is to use web server and setup virtual host. Virtual host works with name based so you don't need an additional IP to setup wildcard domain.Good luck –  eamai Mar 27 '13 at 1:43
    
A good solution for the same question I ased here: apple.stackexchange.com/questions/86603/… –  Daiwei Mar 27 '13 at 22:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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