Linux - SecurityThis 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.
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?
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.