I have a local DNS server that tracks all of my machines in my house, provides caching from the internet on commonly-used look-ups, etc.
I'd like to use that to cache both the internet and the DNS provided by work via VPN.
When I connect to the office, I'm using OpenConnect, which is VPN over SSL - this requires a few DNS lookups before I connect. And, oddly, none of them work with internal DNS lookup.
So, what I'd like to do is find a way to:
- Always look up from my local copy of bind. (nameserver 127.0.0.1, I would think, and I can chattr the +i /etc/resolv.conf to avoid it from being modified when I connect to VPN)
- Use the corporate DNS when looking for *.work.com
- **Fall back** to my local DNS when the corporate DNS fails (either unreachable or otherwise)
- Otherwise use my master for my internal domain, or my ISP/Google DNS for everything else.
I kind of had this working prior to openconnect - with vpnc, the IP I connected to was static, so I could hard-code it and not worry about it changing. However, with openconnect, I connect to one site, and it redirects me to one of another sites (so far, I've seen two possibilities). So I need the DNS to work for those, and those are all *.work.com as well.
Any suggestions are highly appreciated.