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

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

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

share|improve this question

migrated from Apr 18 '11 at 7:22

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

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

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 "scans the servers directory") or dnsmasq ( "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

Your Answer


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.