3 ms·
dnsmasq --interface=lo --all-servers --server=172.16.0.23 --server=8.8.8.8 --server=4.2.2.2 echo "nameserver 127.0.0.1" > /etc/resolv.conf http://www.thekelle
by trotsky 14y ago
dnsmasq --interface=lo --all-servers --server=172.16.0.23 --server=8.8.8.8 --server=4.2.2.2
echo "nameserver 127.0.0.1" > /etc/resolv.conf
http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
--all-servers : By default, when dnsmasq has more than one upstream server available, it will send queries to just one server. Setting this flag 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.
Dnsmasq also has avoidance of unresponsive servers built in, this is a bit more of a blunt instrument.
- kvz 14y agoThanks for the link! I did find dnrd (http://dnrd.sourceforge.net/ http://dnrd.sourceforge.net/), but I really wasn't looking into proxying DNS requests and introducing another daemon / dependency, that could at some point fail or get confused, requiring even more tech to keep it alive, or provide insight in it's workings/reasoning. Really wanted to solve this using as transparent & archaic tech as possible in the hope this still stands when big player's resolving servers fall. Granted, it is blunt; archaic tools often are ; )
- sigil 14y agoThe example you gave won't stick for most people: echo "nameserver 127.0.0.1" > /etc/resolv.conf If you use dhcp3-client (chances are you do), add this line to /etc/dhcp/dhcplient.conf to try your local DNS cache first: prepend domain-name-servers 127.0.0.1; Note that this will slow down stuff like captive portals at airports that want to push you to their "accept terms" page first. I use djb's dnscache instead of dnsmasq, but dnsmasq works fine too. http://cr.yp.to/djbdns/run-cache.html http://cr.yp.to/djbdns/run-cache.html