From owner-freebsd-questions@FreeBSD.ORG Fri Apr 22 16:09:03 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 E3BCA16A4CE for ; Fri, 22 Apr 2005 16:09:03 +0000 (GMT) Received: from mail1.flncs.com (ns1.flncs.com [204.0.142.254]) by mx1.FreeBSD.org (Postfix) with ESMTP id 289BE43D1F for ; Fri, 22 Apr 2005 16:09:03 +0000 (GMT) (envelope-from tradigan@newrevolutions.net) Received: (qmail 50962 invoked by uid 98); 22 Apr 2005 16:09:02 -0000 Received: from 66.166.153.82 by beastie.flncs.com (envelope-from , uid 89) with qmail-scanner-1.25 (clamdscan: 0.82/795. spamassassin: 3.0.2. Clear:RC:1(66.166.153.82):. Processed in 0.128629 secs); 22 Apr 2005 16:09:02 -0000 X-Qmail-Scanner-Mail-From: tradigan@newrevolutions.net via beastie.flncs.com X-Qmail-Scanner: 1.25 (Clear:RC:1(66.166.153.82):. Processed in 0.128629 secs) Received: from h-66-166-153-82.phlapafg.covad.net (HELO l03ptradigan) (tradigan@newrevolutions.net@66.166.153.82) by 0 with SMTP; 22 Apr 2005 16:09:02 -0000 From: "Timothy Radigan" To: "'Luke Dean'" , "'Fabian Anklam'" Date: Fri, 22 Apr 2005 12:09:15 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 In-Reply-To: <20050422083322.E12884@border.crystalsphere.multiverse> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Thread-Index: AcVHUOQdFzTaQ4BwQhi0yDQ27JXZpwABG+Xw X-Qmail-Scanner-Message-ID: <111418614270450955@beastie.flncs.com> Message-Id: <20050422160903.289BE43D1F@mx1.FreeBSD.org> 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 List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2005 16:09:04 -0000 Or, if you don't feel like editing your dhclient.conf, in your /etc/resolv.conf the first line usually reads: search thisdomain.com nameserver xxx.xxx.xxx.xxx nameserver xxx.xxx.xxx.yyy If you change the first line to read: domain thisdomain.com nameserver xxx.xxx.xxx.xxx nameserver xxx.xxx.xxx.yyy If you change the word search to domain, when the link comes up, dhclient will not search for upstream domain servers and it won't replace your hard-coded DNS server list -- Tim -----Original Message----- From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd-questions@freebsd.org] On Behalf Of Luke Dean Sent: Friday, April 22, 2005 11:35 AM To: Fabian Anklam Cc: freebsd-questions@freebsd.org Subject: Re: Prevent DHCP from changing resolv.conf > 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="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. > > Thanks, Fabian In dhclient.conf, put: prepend domain-name-servers 127.0.0.1; This keeps the DNS that DHCP gives you, but it puts your local one first so you'll be able to find your local domains. _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"