Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
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.
|
|
02-08-2007, 10:21 AM
|
#1
|
LQ Newbie
Registered: Feb 2007
Distribution: Gentoo with just the slightest suggestion of Xubuntu and basil
Posts: 10
Rep:
|
dhcp and iptables
Is there an iptables rule that would reject all incoming packets from hosts which haven't received their current ip address from a dhcp daemon running on the same server?
|
|
|
02-08-2007, 11:26 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
not in itself, but i'm sure you could made a script which watches the leases and adds and removes iptables commands when a lease is taken out. there is no such thing as a dhcp lease being "switched off" or anythign though, so you'd want short lease times i guess, and remove iptables entries when a lease expires.
|
|
|
02-08-2007, 02:35 PM
|
#3
|
LQ Newbie
Registered: Feb 2007
Distribution: Gentoo with just the slightest suggestion of Xubuntu and basil
Posts: 10
Original Poster
Rep:
|
ok thanks. It would've been nice if I didn't need a script but that's fine. I'll see what I can do.
|
|
|
02-08-2007, 03:12 PM
|
#4
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
well scripts don't have to be complicated. often the work involved to integrate a normal solution can be more than a self made script...
i googled for a relevent subject, and actually ended up back here... http://www.linuxquestions.org/questi...d.php?t=266151 looks useful potentially.
|
|
|
02-08-2007, 04:35 PM
|
#5
|
LQ Newbie
Registered: Feb 2007
Distribution: Gentoo with just the slightest suggestion of Xubuntu and basil
Posts: 10
Original Poster
Rep:
|
yeah that's exactly what I'm looking for but for a different purpose. I am setting up an nfs server and I only want trusted hosts with known mac addresses to be able to connect. While I was doing this research, though, I thought of a better way. Since the trusted mac's are static, I don't need dhcp to tell iptables which mac addresses are ok. I can just add static rules. It's an interesting concept though, and it would be a very useful feature.
|
|
|
02-09-2007, 02:58 AM
|
#6
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
oh well in that case, yes a static database would be much more preferable. potentially you'd be able to use the dhcpd.conf as that database so as not to have to duplicate the work, but yeah that's right on the money if it's only a local subnet.
|
|
|
02-09-2007, 05:14 PM
|
#7
|
LQ Newbie
Registered: Feb 2007
Distribution: Gentoo with just the slightest suggestion of Xubuntu and basil
Posts: 10
Original Poster
Rep:
|
I have more experience than you think. The Newbie tag is a little misleading as I just switched nicknames
|
|
|
02-10-2007, 02:33 AM
|
#8
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
erm. ok i'm very happy for you.
|
|
|
02-10-2007, 02:33 AM
|
#9
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
erm. ok i'm very happy for you.
|
|
|
All times are GMT -5. The time now is 11:56 AM.
|
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
|
|