Managed DNS server lists and dnsmasq DNS cache
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.
Here are a number of urls that link to this subject:
Welcome to the confusion 2008. This is 2014 ...
|All times are GMT -5. The time now is 04:37 AM.|