resolv.conf issues - suggestion (was Re: browser problems )

Wolfgang Pauli wolfgang.pauli at colorado.edu
Wed Jul 18 16:14:46 UTC 2007


I think you want to put into dhclient.conf not resolv.conf. see 'man 
dhclient.conf'

Wolffgang

On Wednesday 18 July 2007, Dan Ziolkowski wrote:
> slightly confused, where in the file do I add this? Do I add "prepend
> domain-name-servers 208.67.222.222,208.67.220.220" in its entirety?
>
> Thanks Dan
>
> On 7/18/07, Avi Schwartz <ubuntu-users874 at cfftechnologies.com> wrote:
> > Peter Garrett wrote:
> > >>> 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 )
> > >
> > > Pete
> >
> > Another option is to add to dhclient.conf:
> >
> > prepend domain-name-servers 208.67.222.222,208.67.220.220;
> >
> > Which will put your preferred DNS at the top of the list.
> >
> > Avi
> >
> > --
> > ubuntu-users mailing list
> > ubuntu-users at lists.ubuntu.com
> > Modify settings or unsubscribe at:
> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-users






More information about the ubuntu-users mailing list