2

In /etc/dhcp/dhcpd.conf have added

omapi-port 7911;
omapi-key testkey;

key testkey {
  algorithm hmac-sha256;
  secret QUt1z1O3fxqgSDKILAMXFA==;
}

but it won't let me connect when I do

# systemctl restart dhcpd
# omshell 
> server localhost
> key testkey QUt1z1O3fxqgSDKILAMXFA==
> connect
dhcpctl_connect: not found

The key were generated by

# dnssec-keygen -a hmac-sha256 -b 128 -n USER dhcpupdate
# cat Kdhcpupdate.+163+41847.*
dhcpupdate. IN KEY 0 3 163 QUt1z1O3fxqgSDKILAMXFA==
Private-key-format: v1.3
Algorithm: 163 (HMAC_SHA256)
Key: QUt1z1O3fxqgSDKILAMXFA==
Bits: AAA=
Created: 20181123141544
Publish: 20181123141544
Activate: 20181123141544

Question

Can anyone see what I am doing wrong?

Sandra
  • 9,973
  • 37
  • 104
  • 160

1 Answers1

-1

hmac-sha256 changed to HMAC-SHA256 or use HMAC-MD5

Example:

omapi-port 7911;
key omapi_key {
     algorithm HMAC-MD5;
     secret WRcLh5+g2U7kBL6u7+9kh6jv2OwHAQFlLOYUnBfYvmVFutggwGdzIeJL7dnbc5ROdmhl6Eg28wQ61Q==;
}
omapi-key omapi_key;
Zeitounator
  • 1,090
  • 4
  • 12