Date: Fri, 22 Apr 2005 12:21:26 +0200 From: Fabian Anklam <greatnorthern@gmail.com> To: Joerg Pulz <Joerg.Pulz@frm2.tum.de> Cc: freebsd-questions@freebsd.org Subject: Re: Prevent DHCP from changing resolv.conf Message-ID: <467b1e7a050422032133e1eb74@mail.gmail.com> In-Reply-To: <20050422115545.S955@hades.admin.frm2> References: <467b1e7a05042202305325e262@mail.gmail.com> <20050422115545.S955@hades.admin.frm2>
next in thread | previous in thread | raw e-mail | index | archive | help
On 4/22/05, Joerg Pulz <Joerg.Pulz@frm2.tum.de> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > On Fri, 22 Apr 2005, Fabian Anklam wrote: >=20 > > Hi All, > > > > I have a minor problem regarding my network configuration, > > specifically that the external interface on my router gets it's IP via > > DHCP from the ISP, so in rc.conf > > > > ifconfig_xl0=3D"DHCP" > > > > is set. This leads to the single entry in resolv.conf that I want to > > be there, namely > > > > nameserver 127.0.0.1 > > > > being replaced with my ISP's nameservers, which in return makes > > resolving of LAN IPs or even localhost via the installed BIND > > difficult for the machine. I don't want dhclient to change the > > resolv.conf. > > > > I checked the man pages for resolv.conf, rc.conf and dhclient but > > couldn't find anything there relating to my problem. >=20 > Hi, >=20 > the file you need to modify is /etc/dhclient.conf. > for parameters see dhclient.conf(5) >=20 > normally this file is empty, but you can insert global or per interface > require lines for informations the DHCP server has to submit to the clien= t > that the IP is acceptable. you can also insert global or per interface > lines for informations you want to get from the DHCP server if available > but you don't care if the DHCP server gives you nothing on these > options and the IP address is accepted. >=20 > hope that helps > joerg >=20 It does! Looks like i haven't read carefully enough. A prepend domain-name-servers 127.0.0.1 or supersede domain-name-servers 127.0.0.1 in dhclient.conf should be all that's needed. I'll test once I am back at h= ome. Many Thanks, Fabian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?467b1e7a050422032133e1eb74>