I’m trying to connect Nethserver to an Ubiquiti Edgerouter and I have this errors:
next payload type of ISAKMP Hash Payload has an unknown value: different values
malformed payload in packet
I don’t know how to troubleshoot. I don’t at which stage is the problem and what is the problem. I tried several combinations of encryption, but no success so far.
I assume you connect directly from your NS to the ubiquiti router, both have public IPs, no port forwarding.
You can get the IPSEC log on Nethserver with:
journalctl -u ipsec.service
In general you need same settings(encryption, compression, PFS etc.) on both sides.
I did some research and found that it may be a wrong PSK or a firmware issue:
Try to go a bit deeper into settings.
Also, as rule of thumb: keep the system aligned as date and time. I had a working IpSec configuration that stopped working with the wrong time.
The Nethserver logs are in a continous loop:
Aug 16 18:55:32 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1410: deleting state (STATE_MAIN_I3)
Aug 16 18:55:32 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1411: STATE_MAIN_I2: sent MI2, expecting MR2
Aug 16 18:55:32 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1411: STATE_MAIN_I3: sent MI3, expecting MR3
Aug 16 18:55:32 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1411: next payload type of ISAKMP Hash Payload has an unknown value: 67 (0x43)
Aug 16 18:55:32 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1411: malformed payload in packet
Aug 16 18:55:33 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1411: STATE_MAIN_I3: retransmission; will wait 0.5 seconds for response
Aug 16 18:55:33 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1411: STATE_MAIN_I3: retransmission; will wait 1 seconds for response
Aug 16 18:55:34 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1411: STATE_MAIN_I3: retransmission; will wait 2 seconds for response
Aug 16 18:55:36 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1411: STATE_MAIN_I3: retransmission; will wait 4 seconds for response
Aug 16 18:55:40 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1411: STATE_MAIN_I3: retransmission; will wait 8 seconds for response
Aug 16 18:55:48 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1411: STATE_MAIN_I3: retransmission; will wait 16 seconds for response
Aug 16 18:56:04 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1411: STATE_MAIN_I3: retransmission; will wait 32 seconds for response
Aug 16 18:56:36 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1411: STATE_MAIN_I3: 60 second timeout exceeded after 7 retransmits. Possible authentication failure: no acceptable response to our first encrypted message
Aug 16 18:56:36 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1411: starting keying attempt 2 of an unlimited number
Aug 16 18:56:36 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1412: initiating Main Mode to replace #1411
Aug 16 18:56:36 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1411: deleting state (STATE_MAIN_I3)
Aug 16 18:56:36 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1412: STATE_MAIN_I2: sent MI2, expecting MR2
Aug 16 18:56:36 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1412: STATE_MAIN_I3: sent MI3, expecting MR3
Aug 16 18:56:36 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1412: next payload type of ISAKMP Hash Payload has an unknown value: 137 (0x89)
Aug 16 18:56:36 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1412: malformed payload in packet
Aug 16 18:56:37 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1412: STATE_MAIN_I3: retransmission; will wait 0.5 seconds for response
Aug 16 18:56:37 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1412: STATE_MAIN_I3: retransmission; will wait 1 seconds for response
Aug 16 18:56:38 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1412: STATE_MAIN_I3: retransmission; will wait 2 seconds for response
Aug 16 18:56:40 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1412: STATE_MAIN_I3: retransmission; will wait 4 seconds for response
Aug 16 18:56:44 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1412: STATE_MAIN_I3: retransmission; will wait 8 seconds for response
Aug 16 18:56:52 gw.domain.com pluto[30390]: “myipsec-vpn_ipsec-tunnel/1x1” #1412: STATE_MAIN_I3: retransmission; will wait 16 seconds for response
On the Ubiquity show vpn log doesn’t say much. There are several identical lines:
Aug 16 15:53:32 10[IKE] <586> x.x.x.x is initiating a Main Mode IKE_SA
I don’t use ubiquiti edgerouter but maybe I found some errors:
I don’t think the description on ubiquiti matches the ID on Nethserver. It’s just a long description of the IPSEC network whereas the ID identifies server and client. Others used IP address or hostname as ID:
On Ubiquiti you may change ikev1 to ikev2.
Disabled DPD on Nethserver sets it to hold.
To set DPD to hold on ubiquiti:
set vpn ipsec ike-group FOO0 dead-peer-detection action hold
This is not necessary but just to check if it works:
NOTE: There is no need for DPD when IKEv2 is used, as it has a built-in keep-alive mechanism.
Did you enable P2 offload on ubiquiti:
set system offload ipsec enable
Did you set all necessary firewall rules on ubiquiti?