How to setup a simple DNS server to answer just for one name and forward all the rest?

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?


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.