Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| 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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-09-2004, 04:34 AM
|
#1
|
|
Member
Registered: May 2002
Location: Dalec, HU
Distribution: Redhat 7.3
Posts: 696
Rep:
|
Howto update firewall on dhcpd lease
I'm trying to figure out, if it's possible to execute command when dhcpd server makes new lease to clients. I've been looking all over, but couldn't find any info on this.
My goal is that when new dhcp client gets ip address on lan, I'd like to update my firewall so that new ip # can have internet access. I would also check some other parameters while executing script (mac address..), so that I have full control of who is allowed to go out to internet.
My RH9 server has dhcpd server as well as it is a gateway to internet, and clients are windoze boxes.
Any suggestions?
I should probably ask this question over at the dhcp groups, but since this forum is very dynamic, there may be someone that has a suggestion.
Regards
|
|
|
|
06-09-2004, 04:56 AM
|
#2
|
|
Senior Member
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791
Rep:
|
you can allow access to the entire subnet in the dhcp lease. So you won't need to update your iptables each time a new ip is leased.
|
|
|
|
06-09-2004, 04:16 PM
|
#3
|
|
Member
Registered: May 2002
Location: Dalec, HU
Distribution: Redhat 7.3
Posts: 696
Original Poster
Rep:
|
I know that, but I'd like to be on the safe side, and be in control
|
|
|
|
06-09-2004, 10:36 PM
|
#4
|
|
Senior Member
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791
Rep:
|
Idea ...
Run a script from cron which will periodically ...
Check for the last entry in the dhcpd.leases file
Compare with your list already approved ips
If new, insert this new ip entry into your list of approved ips
Re-run the firewall script
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:42 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
|
|