resolv.conf issues - suggestion (was Re: browser problems )
Dan Ziolkowski
dan.ziolkowski at gmail.com
Wed Jul 18 20:21:46 UTC 2007
Tried this, I lost my DNS after reboot. Here is my dhcient.conf file. Maybe
I did it wrong.
Thanks Dan
# Configuration file for /sbin/dhclient, which is included in Debian's
# dhcp3-client package.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
# man page for more information about the syntax of this file
# and a more comprehensive list of the parameters understood by
# dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
# not leave anything out (like the domain name, for example), then
# few changes must be made to this file, if any.
#
#send host-name "andare.fugue.com";
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;
#supersede domain-name "fugue.com home.vix.com";
#prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, host-name,domain-name-servers,
netbios-name-servers, netbios-scope, prepend domain-name-servers
208.67.222.222, 208.67.220.220;
#require subnet-mask, domain-name-servers;
#timeout 60;
#retry 60;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/etc/dhcp3/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject 192.33.137.209;
#alias {
# interface "eth0";
# fixed-address 192.5.5.213;
# option subnet-mask 255.255.255.255;
#}
#lease {
# interface "eth0";
# fixed-address 192.33.137.200;
# medium "link0 link1";
# option host-name "andare.swiftmedia.com";
# option subnet-mask 255.255.255.0;
# option broadcast-address 192.33.137.255;
# option routers 192.33.137.250;
# option domain-name-servers 127.0.0.1;
# renew 2 2000/1/12 00:00:01;
# rebind 2 2000/1/12 00:00:01;
# expire 2 2000/1/12 00:00:01;
#}
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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20070718/7d3cb7f5/attachment.html>
More information about the ubuntu-users
mailing list