I have internal zone old-internal-domain.local
. And we have records like server1.old-internal-domain.local
and www.server1.old-internal-domain.local
.
I want to make all records in old-internal-domain.local
became accessible also in zone new-internal-domain.company.tld
like server1.new-internal-domain.company.tld
without copying records from old zone to new one.
I want something like dns rewrite rules, so when client queries server about server1.new-internal-domain.company.tld
, server internally rewrites it into server1.old-internal-domain.local
and resolves this. In response, it responds as server1.new-internal-domain.company.tld A 10.20.30.40
The key moment is to make it without creating copies of records.
It's better if I can use Windows DNS, but other software is OK too. Please advise.
- This is not ActiveDirectory domain, just an ordinary DNS domain.
I solved a similar use case using BIND. In my scenario, an internal department name changed (and still does change frequently). But I didn't want to maintain old-dept-name and new-dept-name zone files.
So, on my master DNS server, my zone files are defined as:
Notice the same filename is used for both zones. NB: views are heavily used, which is what the GEN* stuff is about.
The key then is on the slave servers to not use the 'file' directive more than once - otherwise you'll run into locking problems during replication. For such zones, the data only resides in RAM. It may not even be necessary to use it at all - it's been a while and I don't recall:
It's not a perfect solution, but I can have nearly unlimited "mirrors" of the same zone. The RAM-based zones are not a concern since they reload from the master at a slave server restart/reload or when a zone is updated.
Some drawbacks:
Good luck!