From owner-freebsd-questions@FreeBSD.ORG Thu May 10 04:58:55 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7A56316A402 for ; Thu, 10 May 2007 04:58:55 +0000 (UTC) (envelope-from yunikan@gmail.com) Received: from nangura.net (smtpgw.nangura.net [202.136.64.55]) by mx1.freebsd.org (Postfix) with SMTP id B8A1E13C457 for ; Thu, 10 May 2007 04:58:51 +0000 (UTC) (envelope-from yunikan@gmail.com) Received: (qmail 22406 invoked by uid 510); 10 May 2007 04:38:46 -0000 Received: from 202.136.78.121 by Mailproxy (envelope-from , uid 502) with qmail-scanner-1.25-st-qms (clamdscan: 0.90.2/3090. perlscan: 1.25-st-qms. Clear:RC:1(202.136.78.121):. Processed in 1.667718 secs); 10 May 2007 04:38:46 -0000 Received: from unknown (HELO gateway.icommbali.local) (202.136.78.121) by nangura.net with SMTP; 10 May 2007 04:38:45 -0000 Received: from richard (richard.icommbali.com [192.168.0.19]) by gateway.icommbali.local (Postfix) with ESMTP id 71AED3BF1A2; Thu, 10 May 2007 12:25:18 +0800 (CIT) From: "Richard Simmonds" To: "'RW'" References: <20070509132217.010c71af@gumby.homeunix.com.> Date: Thu, 10 May 2007 12:31:39 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AceSoq2Om4XMf6siR9apiUD9wijlwAAFxCXA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 In-Reply-To: <20070509132217.010c71af@gumby.homeunix.com.> Cc: freebsd-questions@freebsd.org Subject: ip refresh, resolv.conf and local scripts on startup? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2007 04:58:55 -0000 > (rc.firewall uses this to get network info: > onet=`ifconfig xl0 | grep "inet " | awk '{print $6}'` > oip=`ifconfig xl0 | grep "inet " | awk '{print $2}'` Meaning, > rc.firewall would also have to be re-ran if the IP is new). > [also to make things more complicated, I think I need a rule in > rc.firewallto allow for DHCP clients to go out? It gets blocked on > external interface when firewall comes up??] Looks like you're using ipfw, in which case this works for me: # /etc/rc.d/ipfw restart > Also how do I override /etc/resolv.conf? DHCP client configures it I > think and sets it up to point to my ISP DNS servers (which suck) and > would like to give it mine instead of there, but it keeps getting over > written on startup when it gets a DHCP lease? In dhclient.conf, add your own DNS servers, plus your ISP's as backup: Interface "xl0" { prepend domain-name-servers xxx.xxx.xxx.xxx, yyy.yyy.yyy.yyy; request subnet-mask, broadcast-address, routers, domain-name-servers; } Get new ip: # dhclient xl0 Hope this helps