Score:0

ISC DHCPv6 on Opnsense execute script

cn flag

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?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.