Ny way to add a temporary, static record to DNS

binddomain-name-systemtesting

This is for bind9.

Is there a way to add a DNS record without too much mucking with zone files and named.conf?

I need to test some web servers before we migrate from the old servers to the new ones. Instead of asking everyone to put entries into /etc/hosts for www.example.com, is there a way to get the local DNS server to reply with the new IP for that host?

Yes, I know, this is essentially a DNS hijack. Not that many test machines are involved, so editing /etc/hosts was feasible, but I was wondering if I can do this through DNS.

Best Answer

It's quite easy - add a zone for www.example.com that contains a single A or AAAA record with the appropriate IP address.