Is it possible to intercept cname resolution in DNS resolver.
I have a root of the domain overridden to a local IP, so pinging my.domain would return proxy server's IP, within a public DNS I have a wildcard setup to CNAME redirect *.my.domain to my.domain, but pinging something like app.my.domain will return a public IP of my.domain instead of domain override I've setup earlier.
Pinging my.domain [10.0.0.210] ... ## private IP I've setup via Host Override
Pinging my.domain [18.104.22.168] ... ## public IP, same as if I've not done anything
Somehow pinging the domain directly vs pinging it via a CNAME redirect provides different results.
I'm aware that I can setup local-zone: "my.domain" redirect, but prefer not to use this option as some 2nd level sub-domains I would like to leave with default routing such as remote.office.my.domain. A possible solution would be to allow me to setup exceptions to the redirect rule: Is there a way to setup office.my.domain to be processed normally despite redirecting a lower level my.domain?
Thanks for the feedback, been playing around with this and searching for clues, but so far have found nothing.
If you want
hostA.domain.tld to return local
hostB.domain.tld to return public
hostC.domain.tld to return local
Then you would have to create host overrides for each specific fqdn that you want to return local.
Or you can go the other way and do a redirect, and then just create records that point to your public IP for those fqdn.. Depends on how many you have on what side, etc.