From owner-freebsd-questions@FreeBSD.ORG Fri Apr 22 10:21:27 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 265DB16A4CE for ; Fri, 22 Apr 2005 10:21:27 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7C3843D39 for ; Fri, 22 Apr 2005 10:21:26 +0000 (GMT) (envelope-from greatnorthern@gmail.com) Received: by rproxy.gmail.com with SMTP id i8so616301rne for ; Fri, 22 Apr 2005 03:21:26 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=AnqJbQlr9dCxcVrQpu5YDW9Ijb627Y4AoaCE9TUJWHLtNPy6R4nRHmGGuXtwifypnyU/3tbhaMTBCacpE/3yYYdiqjeZQ2B4y8/Eu6KpWlF949Kwf9T2gYX79dIshTNvck8Xhoed/R2FDqF+IOMznpWWnp2jyjpNeXJ+6NJSm8U= Received: by 10.38.96.3 with SMTP id t3mr3233047rnb; Fri, 22 Apr 2005 03:21:26 -0700 (PDT) Received: by 10.38.209.80 with HTTP; Fri, 22 Apr 2005 03:21:26 -0700 (PDT) Message-ID: <467b1e7a050422032133e1eb74@mail.gmail.com> Date: Fri, 22 Apr 2005 12:21:26 +0200 From: Fabian Anklam To: Joerg Pulz In-Reply-To: <20050422115545.S955@hades.admin.frm2> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <467b1e7a05042202305325e262@mail.gmail.com> <20050422115545.S955@hades.admin.frm2> cc: freebsd-questions@freebsd.org Subject: Re: Prevent DHCP from changing resolv.conf X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Fabian Anklam List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2005 10:21:27 -0000 On 4/22/05, Joerg Pulz 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