You are not logged in.

#1 2020-10-03 08:00:30

Sffred
Member
Registered: 2020-08-30
Posts: 55

How to set up an IKEv2 vpn connection using networkmanager

I am using KDE so my network interface is NetworkManager. I would like to connect to my school's vpn but I don't know how to do it.

I have installed the plugin networkmanager-strongswan, added an "IPsec based VPN (strongswan)" using networknamager and set the "Gateway". I chose EAP authentication and entered my user name and password, but when I click on connect, it just doesn't work. Also,  should I do something else like generate a certificate? I just have no idea about it. The strongswan wiki page confused me.

I chose strongswan because I got a strongswan app on my android phone and it works well with this vpn connection. Of course, that app is user-friendly, so I got it right but can't do the same here.

Last edited by Sffred (2020-10-03 08:00:43)

Offline

#2 2020-10-04 13:52:17

Sffred
Member
Registered: 2020-08-30
Posts: 55

Re: How to set up an IKEv2 vpn connection using networkmanager

Anyone here? I really need help since this connection is important for me, humm, not that important, but I will still appreciate every hint from yours.

Offline

#3 2020-10-04 14:56:05

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,701

Re: How to set up an IKEv2 vpn connection using networkmanager

What VPN does your school use?   Does it require a public key, or does it work with password credentials?
I know nothing of networkmanager-strongswan, but NetworkManager is rock solid with openvpn in both i3 and Gnome, without needing to do anything but provide the credentials.

Edit:  I might add, if one's post receives crickets on these forums, it is generally a clue to provide more information; an empty post does not provide this.

Last edited by ewaller (2020-10-04 14:58:04)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#4 2020-10-05 01:31:21

Sffred
Member
Registered: 2020-08-30
Posts: 55

Re: How to set up an IKEv2 vpn connection using networkmanager

Sorry for my vague description. It doesn't require a public key, you only need "username" and "password".

By the way, I have tried openvpn but it says "The service providing the VPN connection was stopped. " and the connection failed.

Last edited by Sffred (2020-10-05 01:43:03)

Offline

#5 2020-10-06 10:17:44

Sffred
Member
Registered: 2020-08-30
Posts: 55

Re: How to set up an IKEv2 vpn connection using networkmanager

Still not solved.

I have examined the log of NetworkManager.service

Oct 06 18:27:25 DESKTOP-867C NetworkManager[710]: <info>  [1601980045.6467] audit: op="statistics" arg="refresh-rate-ms" pid=2533 uid=1000 result="success"
Oct 06 18:27:28 DESKTOP-867C NetworkManager[710]: <info>  [1601980048.4505] audit: op="connection-activate" uuid="3cc0a6cd-a58c-45b5-a770-30ad0e86d6c8" name="vpn connection s" pid=2533 uid=1000 result="success"
Oct 06 18:27:28 DESKTOP-867C NetworkManager[710]: <info>  [1601980048.4528] vpn-connection[0x55a3304ae380,3cc0a6cd-a58c-45b5-a770-30ad0e86d6c8,"vpn connection s",0]: Saw the service appear; activating connection
Oct 06 18:27:28 DESKTOP-867C charon-nm[2027]: 04[CFG] received initiate for NetworkManager connection vpn connection s
Oct 06 18:27:28 DESKTOP-867C charon-nm[2027]: 04[LIB]   opening '' failed: No such file or directory
Oct 06 18:27:28 DESKTOP-867C charon-nm[2027]: 04[LIB] building CRED_CERTIFICATE - X509 failed, tried 5 builders
Oct 06 18:27:28 DESKTOP-867C NetworkManager[710]: <warn>  [1601980048.4571] vpn-connection[0x55a3304ae380,3cc0a6cd-a58c-45b5-a770-30ad0e86d6c8,"vpn connection s",0]: VPN connection: failed to connect: 'Loading gateway certificate faile>

It seems that I needs a certificate but I don't know how to generate or find one.

If I follow the instructions of strongswan's wiki page and use the ClientCert.pem as the certificate, the connection will still fail with the following log

Oct 06 19:06:09 DESKTOP-867C charon-nm[2027]: 04[CFG] received initiate for NetworkManager connection New vpn connection
Oct 06 19:06:09 DESKTOP-867C charon-nm[2027]: 04[CFG] using gateway identity 'C=CH, O=strongSwan, CN=sffred@sjtu.edu.cn'
Oct 06 19:06:09 DESKTOP-867C charon-nm[2027]: 04[IKE] initiating IKE_SA New vpn connection[3] to 2001:da8:8000:7100::12
Oct 06 19:06:09 DESKTOP-867C charon-nm[2027]: 04[ENC] generating IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) N(FRAG_SUP) N(HASH_ALG) N(REDIR_SUP) ]
Oct 06 19:06:09 DESKTOP-867C charon-nm[2027]: 04[NET] sending packet: from 240e:3a1:1c41:8fc8:d640:fd8e:1bc4:92af[36448] to 2001:da8:8000:7100::12[500] (1000 bytes)
Oct 06 19:06:09 DESKTOP-867C NetworkManager[710]: <info>  [1601982369.9196] vpn-connection[0x55a3304ae170,1f3c829d-5211-44fe-9331-6a2ecfe28625,"New vpn connection",0]: VPN plugin: state changed: starting (3)
Oct 06 19:06:09 DESKTOP-867C charon-nm[2027]: 13[NET] received packet: from 2001:da8:8000:7100::12[500] to 240e:3a1:1c41:8fc8:d640:fd8e:1bc4:92af[36448] (280 bytes)
Oct 06 19:06:09 DESKTOP-867C charon-nm[2027]: 13[ENC] parsed IKE_SA_INIT response 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) N(FRAG_SUP) N(HASH_ALG) N(CHDLESS_SUP) N(MULT_AUTH) ]
Oct 06 19:06:09 DESKTOP-867C charon-nm[2027]: 13[CFG] selected proposal: IKE:AES_CBC_128/HMAC_SHA2_256_128/PRF_AES128_XCBC/ECP_256
Oct 06 19:06:09 DESKTOP-867C charon-nm[2027]: 13[IKE] establishing CHILD_SA New vpn connection{3}
Oct 06 19:06:09 DESKTOP-867C charon-nm[2027]: 13[ENC] generating IKE_AUTH request 1 [ IDi N(INIT_CONTACT) IDr CPRQ(ADDR ADDR6 DNS NBNS DNS6) SA TSi TSr N(MOBIKE_SUP) N(ADD_4_ADDR) N(ADD_4_ADDR) N(ADD_6_ADDR) N(ADD_6_ADDR) N(MULT_AUTH) >
Oct 06 19:06:09 DESKTOP-867C charon-nm[2027]: 13[NET] sending packet: from 240e:3a1:1c41:8fc8:d640:fd8e:1bc4:92af[58109] to 2001:da8:8000:7100::12[4500] (576 bytes)
Oct 06 19:06:09 DESKTOP-867C charon-nm[2027]: 15[NET] received packet: from 2001:da8:8000:7100::12[4500] to 240e:3a1:1c41:8fc8:d640:fd8e:1bc4:92af[58109] (80 bytes)
Oct 06 19:06:09 DESKTOP-867C charon-nm[2027]: 15[ENC] parsed IKE_AUTH response 1 [ N(AUTH_FAILED) ]
Oct 06 19:06:09 DESKTOP-867C charon-nm[2027]: 15[IKE] received AUTHENTICATION_FAILED notify error
Oct 06 19:06:09 DESKTOP-867C NetworkManager[710]: <warn>  [1601982369.9904] vpn-connection[0x55a3304ae170,1f3c829d-5211-44fe-9331-6a2ecfe28625,"New vpn connection",0]: VPN plugin: failed: connect-failed (1)
Oct 06 19:06:09 DESKTOP-867C NetworkManager[710]: <warn>  [1601982369.9905] vpn-connection[0x55a3304ae170,1f3c829d-5211-44fe-9331-6a2ecfe28625,"New vpn connection",0]: VPN plugin: failed: connect-failed (1)
Oct 06 19:06:09 DESKTOP-867C NetworkManager[710]: <info>  [1601982369.9906] vpn-connection[0x55a3304ae170,1f3c829d-5211-44fe-9331-6a2ecfe28625,"New vpn connection",0]: VPN plugin: state changed: stopping (5)
Oct 06 19:06:09 DESKTOP-867C NetworkManager[710]: <info>  [1601982369.9908] vpn-connection[0x55a3304ae170,1f3c829d-5211-44fe-9331-6a2ecfe28625,"New vpn connection",0]: VPN plugin: state changed: stopped (6)
Oct 06 19:06:09 DESKTOP-867C NetworkManager[710]: <warn>  [1601982369.9965] vpn-connection[0x55a3304ae170,1f3c829d-5211-44fe-9331-6a2ecfe28625,"New vpn connection",0]: VPN plugin: failed: login-failed (0)

Last edited by Sffred (2020-10-06 11:13:38)

Offline

Board footer

Powered by FluxBB