Persistent DNS setup for nomadic Linux users

1

After looking desperately on the Internet for having an answer, I will expose my problem to you.

I am working on a Linux station as a consultant, so my DNS setup is regularly a mess:

  • I have to be connected to my company's VPN permanently, so being able to resolve hosts for my company's domain, let's say *.company.com
  • When I am connected on customer's network, I need to be able to resolve their internal names as well
  • To top it up, I am regularly connected to my personal VPN that provides its own DNS for a specific domain, let's say *.vpn

I know that I can use DNSmasq as a local resolver for associating a domain to a specific nameserver.

My question is about how achieving the perfect setup:

  • I need to have *.company.com being resolvable at any time
  • I also need to have *.vpn being resolvable when I am connected to it (which it pretty much the same configuration as for my company)
  • Also, when the domain is not *.company.com or *.vpn, I need to fallback on the local connection DNS if available, or if not provided by DHCP nor manually, use my company's resolver

If any of you guys have advices for reaching this dreamed configuration, I would really appreciate it.

Myriam Valenza

Posted 2018-08-28T18:24:31.610

Reputation: 11

No answers