0

I've recently installed Debian 8 (Jessie) and I'm having trouble with DNS resolving in a particular network configuration: I must connect to 2 different networks (1) ethernet and (2) wireless.

Each network has it's own DNS servers and here lies the problem. When the system is asked to resolve a URL, it only uses the first DNS server (I have 3, and some are intranet-specific, while other are internet-specific).

Is there a configuration to force DNS resolution on all 3 servers (or resolve in cascade - e.g. if the first fails, try the second, etc..) ?

  • It's possible, but requires you to setup BIND as a local DNS forwarder on your machine. Here is a how-to. Though it's from 2009 it should still be valid to date. – Nephente Oct 2 '15 at 19:44
  • Thank you Nephente, it that was helpful but since I'm using a laptop it doesn't seem a flexible solution. – Kiji Oct 5 '15 at 15:33
0

You might like to try dnsmasq, which is a small caching DNS proxy that is simple to set up and has an option:

--all-servers forces dnsmasq to send all queries to all available servers. The reply from the server which answers first will be returned to the original requester.

Amongst other things you add to the start of /etc/resolv.conf

nameserver 127.0.0.1

followed by your real nameservers, so requests go first to dnsmasq. See debian wiki. This also has the advantage of reducing network traffic, as results are cached.

  • Thanks I'm going to give this a try and I'll update the thread with the results – Kiji Oct 5 '15 at 15:34
  • Thanks, this solved the problem. For reference, I followed this instructions to get it working on Debian 8: [unix.stackexchange.com/questions/37264/… – Kiji Oct 5 '15 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.