DHCPD Scripts

Carlos Vicente cvicente at network-services.uoregon.edu
Thu Sep 25 00:11:47 UTC 2008


Tim Gustafson wrote:
> Hello,
>
> I am setting up a new ISC-DHCP server on a fresh FreeBSD 7.x box from the
> ports tree.  The server is running fine, but I have a requirement that I
> can't seem to find a good way to accomplish.
>
> Whenever an IP address is leased, renewed or released, I need DHCPD to fire
> off a shell script that will do a few accounting things for me (update some
> mySQL data, adjust the box's firewall rules, etc).
>
> Is there any way to configure DHCPD to run scripts like that?
>
> Thanks!
>
> Tim Gustafson
> SOE Webmaster
> UC Santa Cruz
> tjg at soe.ucsc.edu
> 831-459-5354
>
>
>   
I don't think so, but your script could parse the leases file
periodically.  If you know perl, give this module a try:

   
http://search.cpan.org/~cvicente/Text-DHCPLeases-v0.6/lib/Text/DHCPLeases.pm

cv


More information about the dhcp-users mailing list