Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 May 2007 12:31:39 +0800
From:      "Richard Simmonds" <>
To:        "'RW'" <>
Subject:   ip refresh, resolv.conf and local scripts on startup?
In-Reply-To: <>
References:  <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help

> (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, yyy.yyy.yyy.yyy;
request subnet-mask, broadcast-address, routers, domain-name-servers;

Get new ip:
# dhclient xl0

Hope this helps

Want to link to this message? Use this URL: <!&!AAAAAAAAAAAYAAAAAAAAAPOytc9vInVGkl54LcL/nGDCgAAAEAAAAOaMkWMXYsFIsiYSA4lclHABAAAAAA==>