Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My raw DNS setting in /etc/resolv.conf is 8.8.8.8 , and now I set it to 127.0.0.1

I want to match *.dev to localhost, and others goes to 8.8.8.8, how to do this?

share|improve this question

migrated from stackoverflow.com Apr 18 '11 at 7:22

This question came from our site for professional and enthusiast programmers.

1  
Why BIND and not something such as dnsmasq? –  Ignacio Vazquez-Abrams Apr 18 '11 at 5:24
    
thanks, resolved. dnsmasq address=/dev/127.0.0.1 –  guilin 桂林 Apr 18 '11 at 6:18
add comment

1 Answer 1

You cannot do this from the bare UNIX resolver. You need to set up a local DNS cache to do the routing. There are several trivial to configure; it will take you about 10 minutes with dnscache (see http://cr.yp.to/djbdns/dnscache.html "scans the servers directory") or dnsmasq (http://www.thekelleys.org.uk/dnsmasq/docs/setup.html "Using special servers"). You don't need one cache per client, you can set up one such forwarding cache for the whole network, and then route other clients through it.

share|improve this answer
add comment

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.