LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-09-2011, 05:36 PM   #1
DarkBeer
LQ Newbie
 
Registered: May 2011
Posts: 2

Rep: Reputation: 0
How to time limit a DHCP lease


Thinking my question falls into the grey area that may or may not be proper in the networking forum, so decided to try my luck in the server forum first.

I would like to be able to schedule a limit for an IP connection for my kid's computers/iPods. Since I know the MAC addresses of their various hardware items, is there a way to shut down their connectivity at a particular time via the DHCP server or perhaps a firewall rule?
Running Ubuntu 10.04 and Shorewall is being used for the firewall.
Thanks!
 
Old 05-09-2011, 05:48 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
This wouldn't be a DHCP issue really. It's possible with short leases and such, but I'd probably look at iptables level IP filtering. It's not quite what you sound like you want, but a simple static time slot is fairly easy... http://linuxgazette.net/108/odonovan.html Being cleverer than that (maybe something with the "recent" module could work) could get messy with the general background hum of traffic the phones create what with Steve Jobs spying on their every move.
 
Old 05-09-2011, 06:12 PM   #3
DarkBeer
LQ Newbie
 
Registered: May 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Would it help if I had the DHCP server always assign the same IP to the devices? Perhaps a drop rule in the firewall could be used at that point based on the IP?
 
Old 05-10-2011, 01:41 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
well dhcp *should* give the same address fairly consistently. I guess a lot of this needs you to erm.. "Know your enemy" in terms of what actions are going to be able to be bypassed or such like.
 
Old 05-10-2011, 02:38 AM   #5
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,467
Blog Entries: 11

Rep: Reputation: 184Reputation: 184
To make sure it always assigns the same address use something like this
Code:
host 2626-2 {
hardware ethernet 00:11:85:AA:35:90;
fixe-address 2626-2.example.com;
}
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dhcp lease time algorithm apparently imprecise? dagril Linux - Networking 2 03-04-2011 03:29 AM
[SOLVED] DHCP lease time anomaly LQParsons Linux - Networking 3 06-17-2010 09:19 PM
DHCP Server - No lease time? piercey Linux - Server 2 07-21-2008 12:15 PM
Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address blackfish Linux - Server 3 08-17-2007 01:54 AM
Invalid DHCP server lease time CloudBuilder Linux - Wireless Networking 3 04-30-2004 09:41 PM


All times are GMT -5. The time now is 07:30 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration