17

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?

user9517
  • 115,471
  • 20
  • 215
  • 297
angaran
  • 355
  • 2
  • 3
  • 11

1 Answers1

20

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.

Eduardo Ivanec
  • 14,881
  • 1
  • 37
  • 43
  • 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 07 '11 at 14:28