Bill Jonas on Tue, 21 May 2002 20:26:55 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] dhcp with a domain other than the server's


On Tue, May 21, 2002 at 07:30:38PM -0400, pinkee@cavegirl.org wrote:
> I am using that client, but the .conf file was completely commented out.
> Odd?

No, that just means it's using the defaults.  For most purposes, this is
fine.

Here's how I set things up on my firewall/gateway machine:

bj@morpheus:~$ grep -v -e ^# -e ^$ /etc/dhclient.conf
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, host-name;
require subnet-mask;
supersede domain-name-servers 127.0.0.1;
append domain-name " billjonas.com";
timeout 60;
bj@morpheus:~$ cat /etc/dhclient-exit-hooks 
if [ -n "`ifconfig eth1 | grep UP`" ]; then
  if [ x$old_ip_address != x$new_ip_address ]; then
    /etc/init.d/firewall restart
    exit $?
  fi
fi 

I have bind running on this machine, so I don't need my ISP's name
servers, so I supersede that.  I decided to go ahead and accept the
search line from the DHCP server and simply add my own.  The
dhclient-exit-hooks file simply checks to make sure my external
interface is up.  If it is, and the IP address has changed, it reloads
my firewall rules so I'm accepting traffic for the proper IP address.

-- 
Bill Jonas    *    bill@billjonas.com    *    http://www.billjonas.com/
"They that can give up  essential  liberty to obtain a little temporary
safety deserve neither liberty nor safety."        -- Benjamin Franklin

Attachment: pgp7lNgxiBfS8.pgp
Description: PGP signature