LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Managed DNS server lists and dnsmasq DNS cache (http://www.linuxquestions.org/questions/linux-networking-3/managed-dns-server-lists-and-dnsmasq-dns-cache-690632/)

nitrousoxide82 12-15-2008 12:37 AM

Managed DNS server lists and dnsmasq DNS cache
 
Hi all,

I tried to be as descriptive as possible within my limitations (English is not my native language), so if the title doesn't describe my question well I apologize in advance. I've read the sticky on this forum section before posting, but even so I'm not 100% sure this post belongs here (although it relates to the handling of DHCP and DNS), so if it doesn't I apologize in advance as well.

My question is: I am using Xubuntu 8.10 "Intrepid Ibex" on a WiFi-enabled laptop, and I have it connect to different access points. IP configuration is usually done via DHCP. This means I can't have a static DNS server list (in /etc/resolv.conf).

I would like to use dnsmasq as a local DNS cache. For it to be effective, I would need a way to have it put 127.0.0.1 in front of anything it receives via DHCP on the DNS server list. How do I do that? Editing /etc/resolv.conf won't work, NetworkManager overwrites it whenver I get new DNS server addresses, and... it sure makes my life easier when using the wireless network, I don't really know how to mess with iwconfig yet... ;)

I'm thinking of putting a little script on /etc/network/if-pre-up.d (or maybe /etc/network/if-up.d) which would look for "nameserver 127.0.0.1" on /etc/resolv.conf and prepend that line to the file, would that work?

Thanks in advance.

carello 02-21-2014 10:34 PM

Here are a number of urls that link to this subject:

http://www.thekelleys.org.uk/dnsmasq/doc.html
http://www.thekelleys.org.uk/dnsmasq...smasq-man.html
http://www.thekelleys.org.uk/dnsmasq/docs/FAQ
http://www.thekelleys.org.uk/dnsmasq/CHANGELOG
http://en.wikipedia.org/wiki/Dnsmasq
http://unix.stackexchange.com/questi...g-its-hostname
http://sourceforge.net/p/ddclient/wiki/Home/

Welcome to the confusion 2008. This is 2014 ...


All times are GMT -5. The time now is 10:57 PM.