Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 setup a small Linux (Ubuntu) server for a school project. This school server should forward all the request to the primary DNS server of the network and reply with an IPv6 address when asked for

How can I do this?

share|improve this question

migrated from May 7 '11 at 13:18

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

up vote 12 down vote accepted

I have used dnsmasq for similar things in the past.

First edit your /etc/hosts file and add the relevant entries so they resolve to the expected addresses when trying them locally (for example with ping). Then apt-get install dnsmasq and make sure no-hosts is commented out in the configuration file (it should be by default).

The way this works (by default) is: when having to resolve a name, dnsmasq first looks it up in your hosts file. If not found, it forwards it through the DNS servers configured on /etc/resolv.conf.

share|improve this answer
Thank you, this is just what I was searching for. Dnsmasq offers a plain and easy configuration file, I added a line to resolve to an IPv6 address and it works like a charm without even touching resolv.conf! – angaran May 7 '11 at 14:28

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.