From owner-freebsd-questions@FreeBSD.ORG Wed May 9 12:22:23 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 00EF616A403 for ; Wed, 9 May 2007 12:22:23 +0000 (UTC) (envelope-from fbsd06@mlists.homeunix.com) Received: from mxout-03.mxes.net (mxout-03.mxes.net [216.86.168.178]) by mx1.freebsd.org (Postfix) with ESMTP id CD45B13C484 for ; Wed, 9 May 2007 12:22:22 +0000 (UTC) (envelope-from fbsd06@mlists.homeunix.com) Received: from gumby.homeunix.com. (unknown [87.81.140.128]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id D958451944 for ; Wed, 9 May 2007 08:22:20 -0400 (EDT) Date: Wed, 9 May 2007 13:22:17 +0100 From: RW To: freebsd-questions@freebsd.org Message-ID: <20070509132217.010c71af@gumby.homeunix.com.> In-Reply-To: References: X-Mailer: Claws Mail 2.9.1 (GTK+ 2.10.12; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: 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: Wed, 09 May 2007 12:22:23 -0000 On Tue, 8 May 2007 16:11:21 -0500 "Jack Barnett" wrote: > I have a script that updates some dynamic DNS records (can be run as > non-root if needed). > > It needs to be run on startup - after network is configured and after > rc.firewall (it'll get blocked if it's run before the firewall is > setup). > > What is a good place to put this? I could put it at the end of > rc.firewall, but is there a better place to put it? This is a problem that people see when they need to update a local dhcp server on a machine that gets its own settings by dhcp. Try google. > Also how do I refresh a dynamic IP without rebooting? > > Sometimes my cable modem gets messed up and under windows I just do: > ipconfig /release > ipconfig /renew > > and it gets new IP and sets everything up. In FreeBSD is there a way > to reconfigure everything without rebooting? /etc/rc.d/dhclient restart should do it > (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??] I doesn't appear to matter, I think dhclient bypasses the firewall. at least that's my experience with PF. > 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? See dhclient.conf(5) for how to control what DHCP does to resolv.conf,