varying a dhcp client on and off

varying a dhcp client on and off

Post by Jare » Wed, 12 Dec 2001 22:53:31



Ok, here's a dumb question.  On my wife's Win2K PC she has a program
called ZoneAlarm which, simplistic as it is, has an interesting
feature - the internet 'lock'.  I hooked up a Win2K laptop to my cable
modem for a few days with this feature enabled and was not broken into
once - i.e., no alerts showed up, no files touched, etc.

So it struck me that I could do something similar with Linux (in this
case, MDK 8.1).  Has anyone ever just varied their ethernet connection
up and down *while keeping their DHCP license valid*, i.e., not losing
their net connection when they brought the interface back up?  If so,
this might be a useful utility to write (I'm a middling perler and
have been looking to try Tk/Tcl with it).

Best regards,
jh

 
 
 

varying a dhcp client on and off

Post by stepha » Thu, 13 Dec 2001 01:52:33



> Ok, here's a dumb question.  On my wife's Win2K PC she has a program
> called ZoneAlarm which, simplistic as it is, has an interesting
> feature - the internet 'lock'.  I hooked up a Win2K laptop to my cable
> modem for a few days with this feature enabled and was not broken into
> once - i.e., no alerts showed up, no files touched, etc.

What makes you sure you WOULD be attacked? The lack of attacks is not a
reason to feel safe from attacks.

----- stephan
Registered Linux User #71917 http://counter.li.org
I speak for myself, not my employer. Contents may
be hot. Slippery when wet. Reading disclaimers makes
you go blind. Writing them is worse. You have been Warned.

 
 
 

varying a dhcp client on and off

Post by James Knot » Thu, 13 Dec 2001 02:35:00



> Ok, here's a dumb question.  On my wife's Win2K PC she has a program
> called ZoneAlarm which, simplistic as it is, has an interesting
> feature - the internet 'lock'.  I hooked up a Win2K laptop to my cable
> modem for a few days with this feature enabled and was not broken into
> once - i.e., no alerts showed up, no files touched, etc.

> So it struck me that I could do something similar with Linux (in this
> case, MDK 8.1).  Has anyone ever just varied their ethernet connection
> up and down *while keeping their DHCP license valid*, i.e., not losing
> their net connection when they brought the interface back up?  If so,
> this might be a useful utility to write (I'm a middling perler and
> have been looking to try Tk/Tcl with it).

Your best bet would be a firewall of some sort.  A lot of those Windows
hacks, are due to substandard MS software.

You can start and stop a lan connection in Linux with the ipconfig
command, though I have no idea what would happen with DHCP leases.  I
suppose that if you're really worried about it, you could have a script
start the interface, renew the lease and then shut down the interface
again.  Simple script stuff, start it with cron.

--


james.knott.

 
 
 

varying a dhcp client on and off

Post by Lewin A.R.W. Edward » Thu, 13 Dec 2001 05:23:40


Quote:> case, MDK 8.1).  Has anyone ever just varied their ethernet connection
> up and down *while keeping their DHCP license valid*, i.e., not losing
> their net connection when they brought the interface back up?  If so,

As long as the cache files (/etc/dhcpcd/*.cache and *.info) are intact, and
the lease time isn't expired, dhcpcd will keep the old lease, even across
reboots. In fact, this is an undesirable behavior for me so I've worked on
some elegant ways to subvert this behavior.

I don't have it in front of me to check, but I'm 70% certain that explicitly
running dhcpcd -k deletes the cache files while killing the daemon, so you
should write a shell script to back them up and restore them.

BTW, does your cable modem give you raw TCP/IP? The cable and ADSL services
I've used all use PPPoE, so if there's an inactivity timeout the lease is
invalidated at the other end.

A firewall sounds like a more flexible and useful solution here, really...

--
=== Lewin A.R.W. Edwards
Responsibly disposing of dangerous liqueur chocolates
and surplus peppermints since 1974.
http://www.larwe.com/

 
 
 

varying a dhcp client on and off

Post by Jare » Fri, 28 Dec 2001 05:25:43


OK, scripting it is.  

My provider doesn't use PPPoE, it's straight TCP/IP.  I hesitate to
post the name as they, like everyone else, have a "one modem, one
computer" rule.  If you email me I'll tell you who it is.  They are,
unfortunately, regional.


Quote:

> BTW, does your cable modem give you raw TCP/IP? The cable and ADSL services
> I've used all use PPPoE, so if there's an inactivity timeout the lease is
> invalidated at the other end.

> A firewall sounds like a more flexible and useful solution here, really...