OVH Community, your new community space.

resolv.conf order and DNS system set up


Alicks
12-05-2012, 16:49
A peculiar question:

I'm running a myDNS server locally, which contains but a few zones which (when resolved locally and locally only) I want to work (Both PTR and A/AAAA). The DNS server works fine, but the only way in which I can get my system (Debian) to look up the records via the local DNS server is to edit /etc/resolv.conf and put only 'nameserver 127.0.0.1' in it.

Adding any other nameservers results in it bypassing 127.0.0.1 and not using it at all, but having only 127.0.0.1 as a nameserver obviously prevents me from resolving any external addresses.

Does anyone know of a way in which I can modify my system to first try looking things up on the local DNS server, and then if that fails, to look up on a secondary nameserver? (Efficiency isn't too much of an issue).

Swapping to BIND9 or using /etc/hosts are not a viable alternatives.

Any help appreciated.


Edit:
I did read that the order in which you put the namservers in resolv.conf affects the order they're tried, however, swapping the orders around made no difference, the non local nameserver was always favoured.