- Remove From My Forums
-
Вопрос
-
Всем доброго!
Настроил я сервак впн для работы с ikev2. Но не очень понял в чем проблема при подключении: Пока проверяю внутри сети на отдельной машине. Если в свойствах впн подключения на клиенте указано полное доменное имя впн сервера vpnserver.firma.local,
то я могу подключиться к серверу, если указать просто vpnserver без домена, то клиентское подключение сообщает «неприемлемые учетные данные проверки подлинности ike». И соответственно, сейчас открыли все что нужно на маршрутизаторе,
чтобы можно было на впн сервак попадать уже из инета, и получается в свойствах клиентского подключения мы меняем адрес пока на внешний ip 2xx.xx.xx.xx. И при попытке подключиться к впн серверу получаем такую же ошибку «неприемлемые
учетные данные проверки подлинности ike». Это с чем может быть связано?Соответсвенно в логах ВПН сервера регистрируется вот такое событие:
«Имя журнала: System
Источник: RemoteAccess
Дата: 02.06.2017 16:04:24
Код события: 20255
Категория задачи:Отсутствует
Уровень: Ошибка
Ключевые слова:Классический
Пользователь: Н/Д
Компьютер: VPNSRV.Firma.local
Описание:
CoID={F55B7B1A-90C5-51A1-58E3-887C43DB27A2}: Следующая ошибка возникла в модуле протокола точка-точка (PPP), порт: VPN1-47, пользователь: <Непроверенный пользователь>. Таймаут согласования»Единственное место где я указал vpnserver.firma.local при настройке всего этого хозяйства (RRAS+CA+NAP) — это когда через веб интерфейс на сервере сертификатов СА (http://caserver/srvcert) делал сертификат для ВПН сервера. Там при выборе
шаблона этого сертификата становятся доступны поля и надо было заполнить поле имя. Процесс делал по видео https://www.techdays.ru/videos/1503.html.
Сталкивался кто-то с подобной конфигурацией по настройкам и такой ошибкой?
Download PC Repair Tool to quickly find & fix Windows errors automatically
A virtual private network (VPN) is mostly used to protect a user’s privacy in the online world and skit their physical location. While most of the time these perform well, there are some occasions when the user can encounter errors, crashes, or different connection issues with their VPN program. When your VPN is not working, not connecting, or has been blocked, there are some quick fixes you can try to get it solved. Though there are many possible errors that a user can encounter with VPNs, there are a few who gain more eminence than others; one such error code is VPN Error 13801, IKE authentication credentials are unacceptable

Fix VPN Error 13801 on Windows 11/10
This Internet Key Exchange version 2 (IKEv2) error are related to problems with the server authentication certificate. Basically, the machine certificate required for authentication is either invalid or doesn’t exist on your client’s computer, on the server, or both.
Here’s a quick breakup of the possible causes of Error 13801:
- The machine certificate on the RAS server has expired
- The trusted root certificate to validate the RAS server certificate is absent on the client
- VPN server name as given on the client doesn’t match the subject name of the server certificate
- The machine certificate used for IKEv2 validation on RAS Server does not have “Server Authentication” as the EKU (Enhanced Key Usage).
Since the users do not have any control over the server, there’s very little that can be done to fix this issue. And in most cases, the user might have to the VPN provider’s help desk and get them to repair the error 13801.
VPN error 13801 clearly references the protocols being used by the VPN service, so you don’t have to waste time figuring out what IKEv2 for VPN error 1380 is. Look for the correct IKEv2 certificate in the documentation provided by the VPN admin. There are a few ways in which you can confirm this issue:
- The certificate does not have the required Enhanced Key Usage (EKU) values assigned
- The machine certificate on the RAS server has expired.
- The trusted root for the certificate is not present on the client.
- The subject name of the certificate does not match the remote computer
Let’s look at these options in detail:
The certificate does not have the required Enhanced Key Usage (EKU) values assigned
You can check it by the following steps:
1] On the VPN server, run mmc, add snap-in ‘certificates.’
2] Expand certificates-personal-certificates, double click the certificate installed
3] Click detail for ‘enhanced key usage’, verify if there is ‘server authentication’ below
The machine certificate on the RAS server has expired.
If the issue is caused by this reason, connect the CA administrator and enroll a new certificate that doesn’t expire.
The trusted root for the certificate is not present on the client.
If the client and server are domain members, the root certificate will be installed automatically in ‘trusted root certification authorities.’ You can check if the certificate is present on the client here.
Related errors:
- VPN Error 789, The L2TP connection attempt failed
- VPN error 812, Connection prevented because of a policy configured on RAS/VPN server
- VPN Error 720, Error connecting to a VPN Connection
- VPN Error 868, Name of the Remote Access Server did not resolve
- VPN Error 809, Network connection between your computer and the VPN server could not be established.
The subject name of the certificate does not match the remote computer
You can verify using the below steps:
1] On the client, open ‘VPN connection properties’, click ‘General.’
2] In ‘host name or IP address of destination’ you will need to enter the ‘subject name’ of the certificate used by the VPN server instead of the IP address of the VPN server.
Note: The subject name of the server’s certificate is usually configured as the FQDN of the VPN server.
When to call your VPN Server administrator
Having to deal with VPN errors can be extremely frustrating, and when you cannot troubleshoot them independently, the frustration is even more. That’s exactly the case with VPN Error 13801, so waste no time and contact your VPN administrator to make sure the correct certificate is configured on your PC, which is validated by the remote server.

Ankit Gupta is a writer by profession and has more than 7 years of global writing experience on technology and other areas. He follows technological developments and likes to write about Windows & IT security. He has a deep liking for wild life and has written a book on Top Tiger Parks of India.
Thanks for filing this issue, @b0d8mr4zu.
I don’t think that particular Let’s Encrypt forum thread draws the right conclusion here. The problem is not that strongSwan fails to send the intermediate cert chain (after all, it works just fine with the Mac client, for example).
Instead, the underlying problem seems to be a Windows 10 bug, where certificates are supposed to be lazy-loaded, but rasdial doesn’t lazy load them. See this thread: https://community.letsencrypt.org/t/isrg-root-lazy-loading-problem-missing-from-random-updated-windows-10-versions/141550
The solution that’s suggested does work for now, but may fail in future if and when Let’s Encrypt change their signing setup again.
An alternative solution, at least for new installations, is that we just add the following line to the Windows PowerShell client setup script:
$Response = Invoke-WebRequest -UseBasicParsing -Uri https://valid-isrgrootx1.letsencrypt.org
We can ignore the contents of $Response, but this simple get request has the side effect of loading the ISRG Root X1 cert into the certificate store (you can see this in certmgr.exe under Third-Party Root Certificate Authorities > Certificates).
And once that’s happened, the VPN will connect without issues once again.
The problem here, of course, is that existing Win 10 VPN client setups will need fixing (e.g. by simply visiting that URL in Edge). So I guess I might also add instructions for the alternative-cert fix to the README and/or setup script output.
@glifed Отдельные машины, по моему мнению, лучше через OpenVPN цеплять. Быстрее работают и быстрее ре-коннект при обрыве связи. Ставишь клиента OpenVPN, сертификат в PF генеришь и на основании него делаешь файл .ovpn, подгружаешь в клиента и в автозагрузку его. При старте win машины он сам автоматом соединяется. У меня так кассы в магазинах работают. А IPSec, опять таки по моему мнению, лучше сети соединять. Так у меня и сделано.
Настройка OpenVPN Win: https://softnastroy.com/content/avtomaticheskiy-zapusk-openvpn-v-windows-ispolzuya-nuzhnyy-vam-konfiguracionnyy-fayl-ovpn.html
Шаблон файла .ovpn, что бы долго не искать и не мучаться:
client
dev tun
proto tcp (у меня tcp у себя можешь и udp сделать, как удобно)
remote (адрес твоего сервера)
port //порт твоего сервера
auth SHA256
cipher AES-256-GCM
keysize 256
resolv-retry infinite
nobind
persist-key
persist-tun
keepalive 10 120
comp-lzo
verb 3
<ca> (сертификат сервера, тот который ca из PF)
——BEGIN CERTIFICATE——
——END CERTIFICATE——
</ca>
<cert> (сертификат клиента из PF)
——BEGIN CERTIFICATE——
——END CERTIFICATE——
</cert>
<key> (ключ клиента из PF)
——BEGIN PRIVATE KEY——
——END PRIVATE KEY——
</key>
Hi Farhan,
The article provided by Basty_ss lists the possibilities that may cause this issue:
>The machine certificate used for IKEv2 validation on RAS Server does not have “server Authentication” as the EKU:
We may check it by the following steps: On VPN server, run mmc, add
snap-in “certificates”, expand certificates-personal-certificates,
double click the certificate installed, click detail for “enhanced key usage”, verify if there is “server authentication” below.
>The machine certificate on RAS server has expired.
If the issue is caused by this reason, you may connect CA administrator, enroll a new certificate that doesn’t expire.
>The root certificate to validate the RAS server certificate is not present on client.
If the client and server are domain members, the root certificate will be installed automatically in “trusted root certification authorities”. We may check if the certificate exits.
> VPN Server Name as given on client doesn’t match with the subjectName of the server certificate.
On client, Open VPN connection properties, click General, in “host name or IP address of destination” we need to enter the “subject name” of the certificate used by VPN server instead of
the IP address of VPN server. The subject name of server’s certificate usually configured as the FQDN of VPN server.
In my opinion, the forth possibility is most likely to be the cause.
Best regards,
Anne he
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.
-
Proposed as answer by
Monday, August 31, 2015 1:28 AM
-
Marked as answer by
Steven_Lee0510
Wednesday, September 9, 2015 5:57 AM
Hi Farhan,
The article provided by Basty_ss lists the possibilities that may cause this issue:
>The machine certificate used for IKEv2 validation on RAS Server does not have “server Authentication” as the EKU:
We may check it by the following steps: On VPN server, run mmc, add
snap-in “certificates”, expand certificates-personal-certificates,
double click the certificate installed, click detail for “enhanced key usage”, verify if there is “server authentication” below.
>The machine certificate on RAS server has expired.
If the issue is caused by this reason, you may connect CA administrator, enroll a new certificate that doesn’t expire.
>The root certificate to validate the RAS server certificate is not present on client.
If the client and server are domain members, the root certificate will be installed automatically in “trusted root certification authorities”. We may check if the certificate exits.
> VPN Server Name as given on client doesn’t match with the subjectName of the server certificate.
On client, Open VPN connection properties, click General, in “host name or IP address of destination” we need to enter the “subject name” of the certificate used by VPN server instead of
the IP address of VPN server. The subject name of server’s certificate usually configured as the FQDN of VPN server.
In my opinion, the forth possibility is most likely to be the cause.
Best regards,
Anne he
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.
-
Proposed as answer by
Monday, August 31, 2015 1:28 AM
-
Marked as answer by
Steven_Lee0510
Wednesday, September 9, 2015 5:57 AM
I have an AWS instance that I want to be a VPN server. It will connect Windows 7 clients to a private network in the Amazon cloud.
- I have installed Ubuntu 12.04 and the
strongswan-ikev2package. ipsec versionreportsLinux strongSwan U4.5.2/K3.2.0-52-virtual- Note that both the client and server are behind NAT (the client because it is on a local office network, and the server because it is in Amazon’s cloud). I have unblocked UDP ports 500 and 4500 on both the Amazon dashboard and the client’s firewall.
-
This is /etc/ipsec.conf:
config setup plutostart=no conn %default keyexchange=ikev2 ike=aes256-sha1-modp1024! esp=aes256-sha1! dpdaction=clear dpddelay=300s rekey=no conn win7vpn left=%any leftsubnet=<amazon VPC CIDR block> leftauth=pubkey leftcert=openssl-cert.pem leftid=<vpn server public dns name> right=%any rightsourceip=<amazon private IP address, which elastic ip is forwarded to> rightauth=eap-mschapv2 rightsendcert=never eap_identity=%any auto=add -
This is /etc/ipsec.secrets:
: RSA openssl-key.rsa TESTDOMAINtestuser : EAP "testpassword" -
I have added the CA certificate that signed the server’s host cert to the local machine (not user) cert store so that Windows can authenticate the server.
I then try to connect to the server using the Windows 7 client as prescribed here, with one exception — I’m using the DNS name rather than the IP address. I enter the username, domain, and password in my ipsec.secrets file, and it tries to connect.
When it does, I get strongSwan logs that look like this. I munged these a bit for both censorship and clarity; CLIENTPUB/CLIENTPRIV are the client’s public and private IP addresses and AMAZONPRIV is the server’s private IP address (which is what the server’s public IP — Amazon calls this an «Elastic IP» — forwards to).
Sep 4 00:16:17 localhost charon: 14[IKE] CLIENTPUB is initiating an IKE_SA
Sep 4 00:16:17 localhost charon: 14[NET] received packet: from CLIENTPUB[500] to AMAZONPRIV[500]
Sep 4 00:16:17 localhost charon: 14[ENC] parsed IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) ]
Sep 4 00:16:17 localhost charon: 14[IKE] CLIENTPUB is initiating an IKE_SA
Sep 4 00:16:17 localhost charon: 14[IKE] local host is behind NAT, sending keep alives
Sep 4 00:16:17 localhost charon: 14[IKE] remote host is behind NAT
Sep 4 00:16:17 localhost charon: 14[ENC] generating IKE_SA_INIT response 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) N(MULT_AUTH) ]
Sep 4 00:16:17 localhost charon: 14[NET] sending packet: from AMAZONPRIV[500] to CLIENTPUB[500]
Sep 4 00:16:17 localhost charon: 15[NET] received packet: from CLIENTPUB[4500] to AMAZONPRIV[4500]
Sep 4 00:16:17 localhost charon: 15[ENC] unknown attribute type INTERNAL_IP4_SERVER
Sep 4 00:16:17 localhost charon: 15[ENC] parsed IKE_AUTH request 1 [ IDi CERTREQ N(MOBIKE_SUP) CP(ADDR DNS NBNS SRV) SA TSi TSr ]
Sep 4 00:16:17 localhost charon: 15[IKE] received cert request for "C=US, ST=TX, O=Test CA, CN=Test CA"
Sep 4 00:16:17 localhost charon: 15[IKE] received 316 cert requests for an unknown ca
Sep 4 00:16:17 localhost charon: 15[CFG] looking for peer configs matching AMAZONPRIV[%any]...CLIENTPUB[CLIENTPRIV]
Sep 4 00:16:17 localhost charon: 15[CFG] selected peer config 'dlpvpn'
Sep 4 00:16:17 localhost charon: 15[IKE] initiating EAP-Identity request
Sep 4 00:16:17 localhost charon: 15[IKE] peer supports MOBIKE
Sep 4 00:16:17 localhost charon: 15[IKE] authentication of 'C=US, ST=TX, O=DLP Test CA, CN=vpn.example.com' (myself) with RSA signature successful
Sep 4 00:16:17 localhost charon: 15[IKE] sending end entity cert "C=US, ST=TX, O=DLP Test CA, CN=vpn.example.com"
Sep 4 00:16:17 localhost charon: 15[ENC] generating IKE_AUTH response 1 [ IDr CERT AUTH EAP/REQ/ID ]
Sep 4 00:16:17 localhost charon: 15[NET] sending packet: from AMAZONPRIV[4500] to CLIENTPUB[4500]
At this point, Windows pops up an error message immediately:
Verifying user name and password...
Error 13801: IKE authentication credentials are unacceptable
After a few seconds, charon tries again and then closes the connection.
Sep 4 00:16:37 localhost charon: 16[IKE] sending keep alive
Sep 4 00:16:37 localhost charon: 16[NET] sending packet: from AMAZONPRIV[4500] to CLIENTPUB[4500]
Sep 4 00:16:47 localhost charon: 03[JOB] deleting half open IKE_SA after timeout
And that’s it.
As far as I can tell, I’m following all of the instructions on the strongSwan wiki.
What am I doing wrong here?
Edit: this is definitely a problem with certificates. I disabled the extended validation checks by editing the registry and rebooting as described in MSKB926182 (lol if you wanted a link to that) and I can now connect to my VPN server with no errors. I’ll figure out how to generate certs that satisfy the requirements and add an answer. Thanks to @ecdsa for the pointer to the cert page on the strongSwan wiki that got me pointed in the right direction.