lets say i have this private hostname dev.private.example.com
that is only accessible in a private network over VPN connection and i have prod.example.com
that is accessible to the internet. I have DNS servers to resolve the private hostname and then i can use the public DNS servers(google, cloudflare etc) for the public hostnames.
i will like setup dnsmasq(let me know if there is another tool) so that it will query DNS server for the private hostnames and if it is another hostname then it will resolve via the public DNS servers
How do i go about doing this?