dsnmasq dhcp-script

Started by Webfeger, Today at 10:39:48 AM

Previous topic - Next topic
Hey there,

I want to monitor new dhcp leases with dynamic mappings.
I figured out that dnsmasq will start a script after new lease by using param "dhcp-script" in dhcp config file.
I didn't find a option to set this param on web gui. so where the config file of dnsmasq is place which i can use to add this param?

My plan is to write a script which will check the result against the dnsmasq host file and put the result ina logfile for monit

I'm using OPNsense since this weekend and i still have to figure out how i can optimize the monitoring.

Best regards
Webfeger

I Did found the config file and wrote a script wich will post the results into a logfile.

Sadly i didn't figured out how i can make dnsmasq able to run perl. Thats my current result in dnsmasq logfile:

failed to execute /usr/local/bin/perl /home/dhcp_lease.pl: No such file or directory

Put this in the first line of /home/dhcp_lease.pl

#!/usr/local/bin/perl

and make the script file executable (chmod 755). The use only the script path in the configuration.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)