0

In the ISC DHCP Server that ships with opnsense exist the possibility to run your on scripts triggered by certain events. I want to execute a script whenever a dhcpv6 lease is commited to a client. similar to this webpost ISC DHCP HOOKS

However my script does not get executed. the script itself is really simple:

cat /usr/local/bin/script1.sh
#!bin/sh
echo ausgefuhrt > /tmp/outputtest.txt

owner of the script is dhcpd the user which runs the dhcpd in opnsense

My dhcpv6.conf includes:

on commit {
set ClientIP = binary-to-ascii(10, 8, ".", leased-address);
set ClientMac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
execute("sh /usr/local/bin/script1.sh");
}

But when i check /tmp/outputtest.txt it doesn't change... Anything i am missing?

0 Answers0