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

I would like to run my own local dns-server, that forwards only some dns-queries to special dns-servers and all others to the public google dns servers.

The database of the local DNS-Server should not cache the queries.

E.g.: all subdomains with * to and all others to google dns

share|improve this question
What OS are you looking to do this on? Windows or Linux? – slm Apr 27 '13 at 9:23

DNSMasq does this nicely.

It is a pretty light weight DNS server.

A config that looks like this might be close to what you want.

# requests
# all other requests
share|improve this answer

I've been pretty happy with unbound for a similar setup.

It can be configured to disable caching so it can do what you are looking for:

You can configure * as a forward zone.

I would start here:

forward zone configuration:

name: <domain name>
          Name of the forward zone.

   forward-host: <domain name>
          Name  of  server  to forward to. Is itself resolved before it is

   forward-addr: <IP address>
          IP address of server to forward to. Can be IP 4 or IP 6.  To use
          a nondefault port for DNS communication append '@' with the port

   forward-first: <yes or no>
          If enabled, a query is attempted without the forward  clause  if
          it fails.  The data could not be retrieved and would have caused
          SERVFAIL because the servers  are  unreachable,  instead  it  is
          tried without this clause.  The default is no.
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.