I have a need to be able to identify which public DNS servers machines in internal networks are using for queries. To clarify, I do not want IPs or names of internal DNS servers or network devices. I need a scriptable way to identify what public servers they are calling to when queries are forwarded.
I have setup my VPN client with proper routing so that my default route remains the internet, and only the addresses in my company internal network are routed through the VPN.
This is working correctly, but however, I didn't find a way to do the same with DNS queries.
I would like to have a default DNS server, but all queries to *.mycompany.com and *.mycompanycorp.com and a few other do