This is from the mailing list (modified slightly) - it is a little script 
that greps your external IP and reconfigures LaBrea on an IP change:

1.  Create /etc/LaBrea.in  have it contain the following:

dst host <IPADDR>
     and tcp[2:2] & 0xfc00 == 0
     and not dst port (port # of any services you run that use ports below 
1024 like ssh or ftp or www)

2.  Create /etc/LaBrea.scr   it should contain the following:

#!/bin/sh

IPADDR=`ip addr list label eth0 | grep inet | \
sed '1!d;s/^[^.0-9]*\([.0-9]*\).*$/\1/'`

sed "s/<IPADDR>/$IPADDR/g" /etc/LaBrea.in >/etc/LaBrea.bpf


3.  Allow LaBrea.scr to be executable:

chmod 744 /etc/LaBrea.scr

4.  Edit the dhclient-exit-hooks to with the following changes:

# Reload networking to see new address
   reload_all

Add a few lines so you have

# Reload networking to see new address
   reload_all
   /etc/LaBrea.scr
   svi LaBrea stop
   svi LaBrea start

5.  Back up dhclient and LaBrea - all done :)

Just so you know the filter will block all ports below 1024 (which are the 
ports that are normally denied automatically by Dachstein), make sure you 
aren't running any services on those ports - or alter the bpf accordingly.  
If you only have one IP address like I do here are the options that I use to 
make sure my box doesn't proactively look for unused IPs (contained in the 
LaBrea startup script):

OPTIONS="-i eth0 -l -v -p 80000 -z -x -F /etc/LaBrea.bpf"


Also everything is case sensitive in Linux - thus labrea and LaBrea are two 
totally different words to the OS - so make sure you are typing things 
correctly.  You may just want to cut and paste.


HTH
S



>From: "Craig Caughlin" <[EMAIL PROTECTED]>
>To: "LEAF" <[EMAIL PROTECTED]>
>Subject: [Leaf-user] Will LaBrea work with dynamic IP addresses?
>Date: Wed, 27 Feb 2002 07:33:33 -0800
>
>Hi folks,
>I'm confused (what else is new :-) ). Will LaBrea work with the "default"
>Dachstein CD (which acts as both a DHCP client & Server)? or would I need 
>to
>change DCD for static addresses? I have my generic, Dachstein CD working
>O.K., and would like to incorporate LaBrea...but I can't seem to figure out
>if it will work with the default DCD. Thank you, have a great day!
>
>Craig
>
>
>
>_______________________________________________
>Leaf-user mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/leaf-user




_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


_______________________________________________
Leaf-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user

Reply via email to