Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-09-2011, 04:36 PM
|
#1
|
LQ Newbie
Registered: May 2011
Posts: 2
Rep:
|
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!
|
|
|
05-09-2011, 04:48 PM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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.
|
|
|
05-09-2011, 05:12 PM
|
#3
|
LQ Newbie
Registered: May 2011
Posts: 2
Original Poster
Rep:
|
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?
|
|
|
05-10-2011, 12:41 AM
|
#4
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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.
|
|
|
05-10-2011, 01:38 AM
|
#5
|
Senior Member
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
|
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;
}
|
|
|
All times are GMT -5. The time now is 03:45 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|