IPsec parsing packet failed, possible cause: wrong password with Ubuntu 18.04 laptop

While writing a question about this issue to the forum, I figured out my problem is with Ubuntu 18.04 laptop connecting RouterOS L2TP/IPsec with “ipsec,error IP.ad.dr.ess parsing packet failed, possible cause: wrong password”. I figured I’d go ahead and post this here in case someone else comes to the MikroTik forums looking for this issue.

Earlier this summer I was able to get into all of my L2TP/IPsec with PSK sites, about 10 of them. Now I’m having issues getting into many, but not all, of them because of “ipsec,error IP.ad.dr.ess parsing packet failed, possible cause: wrong password”. The configurations on my Ubuntu 18.04 laptop have not changed. The configurations on the MikroTiks have not changed. The MikroTiks have had RouterOS and RouterBoard firmware updates. The Laptop has had OS updates applied. My last MacOS laptop has died and I cannot test from it.

Even after simplifying the PSK to “1234” on RouterOS and Ubuntu, I was seeing the same error. After a lot of searching, I finally came across https://ubuntuforums.org/showthread.php?t=2416318, which had the recommendation to delete tempfiles in /etc/ipsec.d/ matching the pattern of nm-l2tp-ipsec-*.secrets from my Ubuntu laptop.

That fixed all of my issues.

I feel like Ubuntu has caused me a lot of problems with my VPNs over the last couple of years. You have to manually type in the phase1 and phase2 parameters, seriously??? I think I’m going to invest the time to try FreeBSD on this laptop and see if things don’t get to be more smooth. If that doesn’t work, I may have to go to MacOS. I abandoned Apple because they eliminated the ethernet port on their laptops. I miss iTerm and working VPN configurations…