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

Re: Disappearing DHCP Lease



Jim Bowering wrote:
On November 19, 2002 10:53 am, Donald R. Spoon wrote:

Jim Bowering wrote:

I'm using Libranet Debian 2.0.  This machine always gets a DHCP lease
from my ISP when it boots, but they seem to have a short default lease
period. After about 2 hours I lose my lease.


This is just a guess, but perhaps your DHCP "client" is obtaining an
initial lease before the firewall is started, and your firwall has ports
67 and 68 blocked.  These ports need to be open so your DHCP client can
communicate with your ISP's DHCP server to renew leases.  My firewall
has these ports open and renews the lease on my cable modem about every
two hours just fine.


/etc/rc2.d does have dhcp before firestarter, but my Firestarter-generated firewall.sh contains this:

#DHCP
$IPT -t filter -A INPUT -p tcp -s 0/0 -d 0/0 --dport 67:68 -i $IF -j ACCEPT
$IPT -t filter -A INPUT -p udp -s 0/0 -d 0/0 --dport 67:68 -i $IF -j ACCEPT

which opens the ports on eth0 ($IF), and when I manually run /etc/init.d/networking restart it re-establishes my connection.


BTW, thanks for mentioning FIRESTARTER!  I have been looking for
something like this to replace my current firewall, and have generally
been intimidated by writing my own iptables ruleset.  This looks like
just the thing to get me started.


I'm finding it very useful.


Well, it was just a "guess" <grin>. I just installed FIRESTARTER here and have it running. I was wrong about the leases here... mine doesn't renew until tomorrow some time, so I will not be able to "check it out" here until then. The setup was QUITE easy! I like it!!

I am running a "stock" Debian testing/unstable install on my firewall box. It uses the "dhclient" program that has always performed pretty well for me in the past. I dunno which client Libranet uses, but if it is PUMP, you might want to poke around the config files a bit. If it is "dhclient" then you might want to take a look at the /etc/dhclent.conf file and see what it is setup to run by default. That is about the only other thing I can think of... sorry I can't be more definitive.

Good Luck!

-Don Spoon-




Reply to: