Closed 0xtf closed 6 years ago
Are you using Libreswan and getting the "WARNING: using a weak secret (PSK)" warning message 10 times ? If you aren't, that commit won't help at all.
In the code, to check that Libreswan is indeed ready after it has been restarted, the ipsec auto --ready
command is call in a loop of max 10 attempts with a 1 second sleep between attempts. Once Libreswan becomes ready the code jumps out of the loop and continues. Unfortunatelly ipsec auto --ready
returns failure when PSK < 8 chars regardless of if Libreswan is ready or not. The code before the commit assumed libreswan wasn't started and exits completely if the loop reached the max 10 attempts.
The two main reasons why Ubuntu 17.10 users are having issues not being able to connect to a VPN server with network-manager-l2tp are:
For the 2nd case, you probably have a received NO_PROPOSAL_CHOSEN error
in the logs.
You can use the ike-scan.sh
script on the following page to query the VPN server for the algorithms it is proposing :
You can see an example of a workaround for VPN servers using broken algorithms in the README.md file:
I would need to see the journalctl --boot
log output and/or the ike-scan.sh
output to provide more advice.
Forgot to mention, of course if the VPN server is using weak and old algorithms that are now considered broken, it should be reconfigured to propose stronger algorithms.
But if you can't change what the VPN server is proposing, you'll have to use a workaround of setting the phase 1 and 2 algorithms in the IPsec Options dialog box like in the example workaround mentioned above.
Hi @dkosovic,
I'm gonna go over everything you added and I'll get back to you! Thank you!
So, do add a bit more to this:
I'm using strongSwan. After querying the server with the script and grepping for SA= I get the following:
SA=(Enc=AES KeyLength=128 Hash=SHA1 Group=2:modp1024 Auth=PSK LifeType=Seconds LifeDuration=28800)
SA=(Enc=AES KeyLength=256 Hash=SHA1 Group=2:modp1024 Auth=PSK LifeType=Seconds LifeDuration=28800)
SA=(Enc=AES KeyLength=256 Hash=SHA1 Group=14:modp2048 Auth=PSK LifeType=Seconds LifeDuration=28800)
I'm not sure on how the phase 1 and 2 entries are filled.
Phase 1: aes256-sha1-modp2048
and
phase 2: aes256-sha1-modp1024
Would you like me to provide additional information @dkosovic ?
Thank you!
Just to add that, by using those configurations, I was able to connect.
Glad to hear you got the connection working.
I'm going to redo parts of the README.md file and known issues wiki to make it clearer as to what needs to be done in situations like this.
Hi,
Following the comments on https://askubuntu.com/questions/977664/l2tp-ipsec-vpn-connection-on-ubuntu-17-10-connection-failed-activation-of-net I was wondering if the packages will né upgraded with the commit that prevents the connection from failing.
In my case, my PSK is >8 chars and I still can’t connect.
Thank you.