I was getting this error and i had to surf the internet for 5 hours until i figured out the issue myself. I thought this might save others precious time. So the error i was getting
in the server was looking like this:
Apr 16 18:47:20 vpn pluto: “test2″ #1: probable authentication failure (mismatch of preshared secrets?): malformed payload in packet ed 0f 7a
Apr 16 18:47:20 vpn pluto: | payload malformed after IV
Apr 16 18:47:20 vpn pluto: | b3 39 dc a6 a7 2a 59 0f d9 06 4b 7f 4a
Apr 16 18:47:20 vpn pluto: “test2″ #1: sending notification PAYLOAD_MALFORMED to 18.104.22.168:500
ed 0f 7a
On the client side i was getti
010 “test2″ #1: STATE_MAIN_I3: retransmission; will wait 40s for response
003 “test2″ #1: Informational Exchange message must be encrypted
003 “test2″ #1: discarding duplicate packet; already STATE_MAIN_I3
031 “test2″ #1: max number of retransmissions (2) reached STATE_MAIN_I3. Possible authentication failure: no acceptable response to our first encrypted message
I made sure there are no typos in ipsec.secrets but in the end I figured out the issue.
You have to have a new blank line after the PSK declaration in ipsec.secrets otherwise the system doesn't recognize it. Hope it helps.