resolv.conf issues - suggestion (was Re: browser problems )
Peter Garrett
peter.garrett at optusnet.com.au
Wed Jul 18 00:33:46 UTC 2007
> > Dan Ziolkowski wrote:
> >
> > > I did more work on this, first it is not related to an old version of
> > > Firefox, as the same problem occurs in Galean and Epiphany browsers.
> > >
> > > It seems to be a DNS setting issue. When you open the "Network
> > settings",
> > > the DNS is shown as 192.168.0.1,
[ various snips made awkward by your top posting]
On Tue, 17 Jul 2007 18:15:45 -0400
"Dan Ziolkowski" <dan.ziolkowski at gmail.com> wrote:
> I removed the phrase "domain-name-servers" from the dhclient.conf file. I
> still lose the setting after reboot. Maybe the change needs to be made to
> dhclient-script file?
I suggest trying the following:
1) Make sure you have a valid /etc/resolv.conf ( you say you are using
Open DNS , which should work anywhere, so use those IPs in resolv.conf)
2) Make a script named dhclient-enter-hooks and place it in /etc/dhcp3 .
Mine looks like this ( between the ######## lines):
##############
#!/bin/bash
# Stop overwriting /etc/resolv.conf !
function make_resolv_conf {
echo “Doing nothing to resolv.conf”
}
###############
That's all. Make it executable
sudo chmod +x /etc/dhcp3/dhclient-enter-hooks
You now have a script that does "nothing", but your /etc/resolv.conf will
keep on pointing at your Open DNS servers.
Alternatively, you might have success by simply doing
sudo chattr +i /etc/resolv.conf
which should stop dhclient clobbering your settings by
replacing /etc/resolv.conf on each lease renewal.
You can reverse that with " sudo chattr -i /etc/resolv.conf "
See man 1 chattr :-)
(Credit for the "do nothing" script goes to someone on the Web whose name I
can't remember, sorry )
Peter
More information about the ubuntu-users
mailing list