[WBEL-users] solved : ADSL via DHCP, IP adress and Firewall
Jean LEE
jean_lee_3@hotmail.com
Tue, 14 Sep 2004 14:17:06 +0200
Hello,
Thanks for your answer : that was the right file to modify. I just execute
my Firewall script by adding four lines in /sbin/dhclient-script :
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] ||
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
ifconfig $interface inet $new_ip_address $new_subnet_arg
$new_broadcast_arg
# Add a network route to the computed network address.
if [ $relmajor -lt 2 ] || ( [ $relmajor -eq 2 ] && [ $relminor -eq
0 ] ); then
route add -net $new_network_number $new_subnet_arg dev $interface
fi
for router in $new_routers; do
route add default gw $router
done
# added lines #
echo '############################' >> /var/log/DHCLIENT-SCRIPT.log
echo 'new ip address' >> /var/log/DHCLIENT-SCRIPT.log
echo 'Start Firewall' >> /var/log/DHCLIENT-SCRIPT.log
/etc/rc.firewall >> /var/log/DHCLIENT-SCRIPT.log
fi
If someone needs more informations....
Jean
----- Original Message -----
From: "bishop" <bishop@platypus.bc.ca>
Cc: "Mailing List - White Box" <whitebox-users@beau.org>
Sent: Friday, September 10, 2004 11:09 PM
Subject: Re: [WBEL-users] ADSL via DHCP, IP adress and Firewall
> Salut Jean,
>
> DHClient apparently runs a script (dhclient-script) on IP changes.
>
> 'man dhclient-script' brings up something, and I think it may be what
> you need.
>
> Good luck, and please report back if you win.
>
> - bish
>
> Jean LEE wrote:
> > Hello Paul,
> >
> > I do not use PPoE, just DHCP. Even if I could use ip-up, I have to
> > restart it manually.
> > As the IP change are automatic with DHCP (no reconnection or something
> > else), I thought I have to start this script in my DHCP client to make
> > the launch of this firewall script automatic. Perhaps it is not
feasible....
> >
> > Thanks a lot for your answer.... Any other idea ?
> >
> > Jean
> >
> > ----- Original Message -----
> > *From:* Paul Voccio <mailto:pvoccio@proficient.com>
> > *To:* Jean LEE <mailto:jean_lee_3@hotmail.com> ; Mailing List -
> > White Box <mailto:whitebox-users@beau.org>
> > *Sent:* Friday, September 10, 2004 3:20 PM
> > *Subject:* RE: [WBEL-users] ADSL via DHCP, IP adress and Firewall
> >
> > If you have a pppoe connection, which ADSL sometimes uses here in
> > the states, ip-up and ip-down get called when the connection goes up
> > and down. You should then edit /etc/ppp/ip-up.local and have it
> > re-run your firewall script that will run with the new ip.
> >
> > Paul
> >
> > -----Original Message-----
> > *From:* whitebox-users-admin@beau.org
> > <mailto:whitebox-users-admin@beau.org>
> > [mailto:whitebox-users-admin@beau.org]*On Behalf Of *Jean LEE
> > *Sent:* Friday, September 10, 2004 3:16 AM
> > *To:* Mailing List - White Box
> > *Subject:* [WBEL-users] ADSL via DHCP, IP adress and Firewall
> >
> > Hello all,
> >
> > I have an ADSL connection via an Ethernet router (Freebox in
> > France). My server has an Ethernet card which is connected to
> > this bridge and obtain its IP adress via DHCP.
> > I am also using a firewall script which detects automatically
> > this IP adress. I call this script in my rc.local file.
> > Well, at startup my ethernet card is first brought up and the ip
> > adress is detected via DHCP and then, a few moment later my
> > firewall script is launched and detect this IP adress.
> >
> > My problem is that my provider often changes my IP adress. Then,
> > I have to reexecute manually my firewallscript to take this new
> > ip adress into account. How can I do to make the execution of
> > this firewall script automatic after each change in my IP adress
?
> >
> > Thanks for any help,
> >
> > Jean Lee
> _______________________________________________
> Whitebox-users mailing list
> Whitebox-users@beau.org
> http://beau.org/mailman/listinfo/whitebox-users
>