LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Action trigger on DHCP lease (https://www.linuxquestions.org/questions/linux-networking-3/action-trigger-on-dhcp-lease-625490/)

Cidi Rome 03-03-2008 07:02 PM

Action trigger on DHCP lease
 
Hi there.

Is there any way to trigger a script avery time a new lease happens?

Note: by new lease I mean when a new computer (or an old one) gets an IP address from the DHCP server (dhcpd).

I searched and didn't find anything related, if someone knows a way please tell me.

Best Regards.

beadyallen 03-03-2008 07:15 PM

I can't find anything about doing this with ISC dhcpd, but dnsmasq can do what you want. I've got it doing the same thing for dynamic iptables port forwarding rules on my router. For a smallish network, I think dnsmasq is just as good as dhcpd, and it doubles as a dns server as well.

Cidi Rome 03-04-2008 04:42 AM

Do you know if it can be user only just as a DHCP server, leaving the DNS job for bind?

beadyallen 03-05-2008 11:14 AM

Yes, you can disable the DNS by (according to the man page) setting the listening port to 0.


All times are GMT -5. The time now is 02:33 AM.