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.

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.

share|improve this question
add comment

2 Answers 2

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.

share|improve this answer
add comment

/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

share|improve this answer
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.