1

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.

cjc
  • 24,916
  • 3
  • 51
  • 70

2 Answers2

2

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

MikeyB
  • 39,291
  • 10
  • 105
  • 189
1

/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

uSlackr
  • 6,412
  • 21
  • 37