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.

link|improve this question
feedback

2 Answers

up vote 2 down vote accepted

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

link|improve this answer
feedback

/etc/hosts or zone files are your choices. Poisoning DNS seems like a real bad idea and may not work depending on the DNS config

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.