LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 06-09-2004, 04:34 AM   #1
Noerr
Member
 
Registered: May 2002
Location: Dalec, HU
Distribution: Redhat 7.3
Posts: 696

Rep: Reputation: 30
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
 
Old 06-09-2004, 04:56 AM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 46
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.
 
Old 06-09-2004, 04:16 PM   #3
Noerr
Member
 
Registered: May 2002
Location: Dalec, HU
Distribution: Redhat 7.3
Posts: 696

Original Poster
Rep: Reputation: 30
I know that, but I'd like to be on the safe side, and be in control
 
Old 06-09-2004, 10:36 PM   #4
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 46
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
 
  


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
dhcpd wrong ip lease? del_gr Linux - Newbie 6 10-24-2006 10:58 AM
Firewall for dhcpd?? fatcake Linux - Networking 1 08-19-2004 06:28 AM
dhcpd - new lease every second on M$ box charon79m Linux - Networking 4 06-02-2004 09:31 AM
Howto update KDE and howto switch off kdm/gdm Canaris Linux - Software 1 06-15-2003 08:40 PM
dhcpd lease question Jase Linux - Networking 2 01-31-2002 10:42 AM


All times are GMT -5. The time now is 01:49 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration