Help with /etc/resolv.conf updates - dnsmasq

ben darby ben at cvrse.com
Mon Jul 10 08:12:27 UTC 2006


* Carthik Sharma (carthik at gmail.com) wrote:
> Good Sunday to you all,
> 
> I am trying to setup dnsmasq to act as a cache for NS lookups on my
> local computer (only one computer) at home.
> 
> I have Cable (high-speed) internet where I use dhcp to get leases
> from my ISP.
> 
> When I install dnsmasq, I have to use 127.0.0.1 as the entry for ns
> lookups in /etc/resolv.conf. The docs for dnsmasq say that I have to
> use a copy of my current resolv.conf for forwarding NS lookups which
> are not cached - say a file like /etc/dnsmaq-resolv.conf
> 
> So much for the background, now the problem is that since I use the
> dhcp3 client, the /etc/resolv.conf file gets autoupdated every now and
> then. How do I prevent this from happening?
> Also, if I prevent this from happening, how will I get the addresses
> for non-cached NS lookups from my ISP to go to the
> /etc/dnsmaq-resolv.conf file?
> 
> As an aside, how often do the NS ip addresses for an ISP change? If
> they don't change, ever, then I will be good by creating a copy of my
> current resolv.conf and pointing dnsmasq to the copy for non-cached NS
> lookups.
> 
> I am sorry if some of the above is unclear - please ask and I will
> explain what I mean, if that is the case.

if i understand what your trying todo correctly you should be editing
the /etc/dnsmasq.conf and uncommenting the 
#resolv-file=
line adding a new file which would include your isp dns ips, and then
adding something like this to your dhclient.conf
supersede domain-name-servers 127.0.0.1;
to override any dns settings your dhcp server sends down.

-- 
ben darby <ben at cvrse.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060710/338f5e36/attachment.sig>


More information about the ubuntu-users mailing list