LinuxQuestions.org
Help answer threads with 0 replies.
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, 04: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, 04:48 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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, 05: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, 12:41 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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, 01:38 AM   #5
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
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 02:29 AM
[SOLVED] DHCP lease time anomaly LQParsons Linux - Networking 3 06-17-2010 08:19 PM
DHCP Server - No lease time? piercey Linux - Server 2 07-21-2008 11:15 AM
Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address blackfish Linux - Server 3 08-17-2007 12:54 AM
Invalid DHCP server lease time CloudBuilder Linux - Wireless Networking 3 04-30-2004 08:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:45 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration