Answer the question
In order to leave comments, you need to log in
How to fix an error when a client connects to VPN(ipsec+ikev2)?
Authorization by
ubuntu 16.04 + strongswan certificates is done.
I connect with win7, I added certificates, as described in their wiki.
I also configured the config following their wiki, though on plutostart=no, he swore that he was deprecated, so I removed
ipsec.conf:
config setup
#plutostart=no
conn win7
left=%defaultroute
leftcert=vpnHostCert.der
leftsubnet=0.0.0.0/0
right=%any
rightsendcert=never
rightsourceip=10.42.42.0/24,2002:25f7:7489:3::/112
keyexchange=ikev2
auto=add
Jun 28 03:20:26 myserver charon: 12[IKE] IKE_SA (unnamed)[2] state change: CONNECTING => DESTROYING
Jun 28 03:20:30 myserver charon: 13[NET] received packet: from MYIP[500] to SERVERIP[500] (528 bytes)
Jun 28 03:20:30 myserver charon: 13[ENC] parsed IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) ]
Jun 28 03:20:30 myserver charon: 13[IKE] MYIP is initiating an IKE_SA
Jun 28 03:20:30 myserver charon: 13[IKE] IKE_SA (unnamed)[3] state change: CREATED => CONNECTING
Jun 28 03:20:30 myserver charon: 13[IKE] remote host is behind NAT
Jun 28 03:20:30 myserver charon: 13[ENC] generating IKE_SA_INIT response 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) N(MULT_AUTH) ]
Jun 28 03:20:30 myserver charon: 13[NET] sending packet: from SERVERIP[500] to MYIP[500] (308 bytes)
Jun 28 03:21:00 myserver charon: 14[JOB] deleting half open IKE_SA after timeout
Jun 28 03:21:00 myserver charon: 14[IKE] IKE_SA (unnamed)[3] state change: CONNECTING => DESTROYING
Answer the question
In order to leave comments, you need to log in
А, простите, клиент на винде какой? Чтобы подключиться с винды, нужно преизрядно побиться головой об монитор... В логе видно, что просто ничего не произошло. Шван получил запрос на порт 500, послал ответ, в ответ не получил ничего и спокойно заснул дальше.
Вот в качестве примера конфиг, проверенный на Win7, на клиентах ShrewSoft и TheGreenBow
conn any-deltahwCA-rsa-sleepycat
auto=add
left=1.2.3.4
leftid="<здесь subject сертификата сервера>"
leftauth=pubkey
leftcert=servercert.crt
leftsubnet=10.1.1.0/24
leftca="<здесь subject СA, выдавшего сертификат серверу>"
leftfirewall=yes
leftdns=10.1.1.1,10.1.1.4
right=%any
rightallowany=yes
rightsourceip=10.1.1.28-10.1.1.30
rightid="<здесь subject сертификата винды>"
rightcert=windacert.crt
rightauth=pubkey
rightca="<здесь subject CA выдавшего сертификат винде>"
keyexchange=ikev1
ike=aes128-sha-modp1024,aes192-sha-modp1024,aes256-sha-modp1024!
esp=aes128-sha-modp1024,aes192-sha-modp1024,aes256-sha-modp1024
ikelifetime=2h
lifetime=1h
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question