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.

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 Google.com

How can I do this?

share|improve this question

migrated from stackoverflow.com May 7 '11 at 13:18

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

add comment

1 Answer

up vote 5 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 google.com to an IPv6 address and it works like a charm without even touching resolv.conf! –  angaran May 7 '11 at 14:28
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.