I have a local domain name "SomeName" and an Internet domain "AnotherName.dyndns.org" whose IP can change at any time (it uses a dynamic DNS). I want to resolve "SomeName" to "AnotherName.dyndns.org"'s IP. In other words, if "AnotherName.dyndns.org" points to 188.8.131.52, I want "SomeName" to point to that same IP, namely 184.108.40.206.
Is there any easy and straightforward way to achieve this? I couldn't find such an option for DNSMasq or BIND. I suppose one could write a script that gets the domain's IP and rewrites the config file, then reloads the DNS server, but that would be so ugly.
Why do I want this? To put it simply, I want to setup a Bacula server and client. The server has to resolve "SomeName" to a local IP (static, no problem here) and the client has to resolve it to a public IP (dynamic, namely "AnotherName.dyndns.org").