zorun / kea-hook-runscript

This a hook for the Kea DHCP server that allows to run an external script at various points in the processing of DHCP requests and responses.
Mozilla Public License 2.0
54 stars 23 forks source link

kea-dhcp6: RTNETLINK answers: Operation not permitted #24

Closed vecinohk closed 3 years ago

vecinohk commented 3 years ago

Please anyone have a tip on how I can solve this problem?

kea-dhcp6: RTNETLINK answers: Operation not permitted

I am using: https://github.com/zorun/kea-hook-runscript/blob/master/examples/ipv6_prefix_delegation/ipv6-routes.sh + https://code.ffdn.org/zorun/kea-hook-runscript/-/jobs/243/artifacts/file/kea-hook-runscript-kea-1-8-debian-buster.so + isc-kea-dhcp6-server 1.8.2-isc0001520201206093433 amd64 ISC Kea IPv6 DHCP server

My setup: Debian 11 + kernel 5.10.0-3-amd64

many thanks

zorun commented 3 years ago

Is it possible that Kea is not running as root in your setup? In that case, the script will also not run as root, and you won't be able to add/remove routes.

vecinohk commented 3 years ago

Yep - you're right. Kea is running as "_kea".

Resolved: install sudo + _kea ALL=(ALL) NOPASSWD: /bin/ip -6 route *

All is working now - many thanks @zorun good job