Tls error tls handshake failed windows

Содержание
  1. Проблема OpenVPN — согласование ключей TLS не произошло в течение 60 секунд
  2. 6 ответов
  3. Подключения TLS могут завершаться сбоем или тайм-аутом при соединении или попытке возобновления
  4. Проблемы
  5. Причина
  6. Дальнейшие действия
  7. Дополнительные сведения для администраторов
  8. Затронутые обновления
  9. OpenVPN Support Forum
  10. TLS Error: TLS handshake failed
  11. TLS Error: TLS handshake failed
  12. Re: TLS Error: TLS handshake failed
  13. Re: Doesn’t have a valide IP configuration
  14. Re: TLS Error: TLS handshake failed
  15. Re: Doesn’t have a valide IP configuration
  16. Re: TLS Error: TLS handshake failed
  17. Fix ‘TLS Error: TLS handshake failed’ on OpenVPN client
  18. Tls error tls handshake failed windows
  19. Re: OpenVPN Server error: TLS failed
  20. Re: OpenVPN Server error: TLS failed
  21. Re: OpenVPN Server error: TLS failed
  22. Re: OpenVPN Server error: TLS failed
  23. Re: OpenVPN Server error: TLS failed
  24. Re: OpenVPN Server error: TLS failed
  25. Re: OpenVPN Server error: TLS failed
  26. Re: OpenVPN Server error: TLS failed
  27. Re: OpenVPN Server error: TLS failed
  28. Re: OpenVPN Server error: TLS failed
  29. Re: OpenVPN Server error: TLS failed
  30. Re: OpenVPN Server error: TLS failed
  31. Re: OpenVPN Server error: TLS failed
  32. Re: OpenVPN Server error: TLS failed
  33. Re: OpenVPN Server error: TLS failed
  34. Re: OpenVPN Server error: TLS failed
  35. Re: OpenVPN Server error: TLS failed
  36. Re: OpenVPN Server error: TLS failed
  37. Re: OpenVPN Server error: TLS failed
  38. Re: OpenVPN Server error: TLS failed
  39. Re: OpenVPN Server error: TLS failed
  40. Re: OpenVPN Server error: TLS failed
  41. Re: OpenVPN Server error: TLS failed
  42. Re: OpenVPN Server error: TLS failed
  43. Re: OpenVPN Server error: TLS failed
  44. Re: OpenVPN Server error: TLS failed
  45. Re: OpenVPN Server error: TLS failed
  46. Re: OpenVPN Server error: TLS failed
  47. Re: OpenVPN Server error: TLS failed
  48. Re: OpenVPN Server error: TLS failed
  49. Re: OpenVPN Server error: TLS failed
  50. Re: OpenVPN Server error: TLS failed
  51. Re: OpenVPN Server error: TLS failed

Проблема OpenVPN — согласование ключей TLS не произошло в течение 60 секунд

Я настраиваю сервер OpenVPN (версия 2.3.10) на сервере Windows 2012, но я не могу заставить его работать.

Сервер находится за маршрутизатором, и я открыл порт 1194 и создал правило перенаправления трафика на этом порту на сервер.

Вот журнал, который я вижу на сервере, когда я пытаюсь подключиться от клиента:

Где XX.XX.XX.XX является ip клиента. Поэтому я понимаю, что клиент, по крайней мере, может прийти на сервер, поэтому нет проблем с маршрутизацией или брандмауэром.

Я следил за описанием, представленным здесь Easy Windows Guide Любые идеи?

6 ответов

Интересно, как номер порта меняет средний поток:

Пн Мар 21 11:11:47 2016 XX.XX.XX.XX: 57804 TLS: начальный пакет из [AF_INET] XX.XX.XX.XX: 57804, sid = fdf7a7ac 0264c7f3

Пн Мар 21 11:12:38 2016 XX.XX.XX.XX: 55938 TLS: начальный пакет из [AF_INET] XX.XX.XX.XX: 55938, sid = 1f242a3f e454a525

Это заставляет меня думать, что где-то между клиентом и сервером существует неправильное устройство NAT, устройство с очень кратковременными записями таблицы состояний, которое меняет номер порта источника, который он применяет к установленному потоку клиента, вызывая сервер полагает, что две короткоживущие коммуникации продолжаются, а не один непрерывный.

Такие устройства обычно делают это только с UDP, поэтому я посоветовал вам подтвердить, что вы используете UDP, и вместо этого попробуйте TCP. Это вы сделали и обнаружили, что он исправляет проблему. Следующий шаг — выявить плохое устройство NAT, нанести ему ударный молот и заменить его на тот, который не делает кардинальную ошибку, предполагая, что все сообщения UDP являются эфемерными; но вы указали, что довольны переходом на TCP в качестве обходного пути, и поэтому дело завершено.

Это одна из самых распространенных ошибок при настройке Openvpn, и для этого есть элемент часто задаваемых вопросов. Я приведу это здесь:

Ошибка TLS: согласование ключа TLS не произошло в течение 60 секунд (проверьте сетевое подключение)

Одной из наиболее распространенных проблем при настройке OpenVPN является то, что два Демоны OpenVPN с обеих сторон соединения не могут установить TCP или UDP-соединение друг с другом.

Это почти результат:

  • Брандмауэр периметра в сети сервера фильтрует входящие пакеты OpenVPN (по умолчанию OpenVPN использует UDP или TCP-порт номер 1194).
  • Программный брандмауэр, запущенный на самом сервере сервера OpenVPN, фильтрует входящие соединения на порту 1194. Имейте в виду, что многие ОС заблокирует входящие соединения по умолчанию, если не настроено в противном случае.
  • Шлюз NAT в сети сервера не имеет правила пересылки портов для TCP /UDP 1194 во внутренний адрес сервера OpenVPN машина.
  • Конфигурация клиента OpenVPN не имеет правильного адреса сервера в его файле конфигурации. Удаленная директива в файле конфигурации клиента должен указывать либо на сам сервер, либо на публичный IP-адрес серверной сети.
  • Другая возможная причина заключается в том, что брандмауэр Windows блокирует доступ для двоичного файла openvpn.exe. Возможно, вам понадобится белый список (добавьте его в список «Исключения») для работы OpenVPN.

Весьма вероятно, что любой из них вызывает такую ​​же проблему и в вашем случае. Поэтому просто перейдите по списку один за другим, чтобы разрешить его.

Подключения TLS могут завершаться сбоем или тайм-аутом при соединении или попытке возобновления

Проблемы

При попытке соединения может происходить сбой или тайм-аут TLS. Вы также можете получить одну или несколько из указанных ниже ошибок.

«Запрос прерван: не удалось создать безопасный канал SSL/TLS»

Ошибка, зарегистрированная в журнале системных событий для события SCHANNEL 36887 с кодом предупреждения 20 и описанием, «С удаленной конечной точки получено оповещение о неустранимой ошибке. Определенный в протоколе TLS код оповещения о неустранимой ошибке: 20».​

Причина

В связи с принудительным применением CVE-2019-1318 из соображений безопасности все обновления для поддерживаемых версий Windows, выпущенные 8 октября 2019 г. или позже, применяют Extended Master Secret (EMS) для возобновления, как определено в RFC 7627. При подключении к сторонним устройствам и ОС, которые не соответствуют требованиям, могут возникать проблемы и сбои.

Дальнейшие действия

После полного обновления соединения между двумя устройствами под управлением любой поддерживаемой версии Windows не должны иметь этой ошибки. Для этой ошибки обновление Windows не требуется. Эти изменения необходимы для устранения неполадок безопасности и соответствия требованиям безопасности.

Все сторонние операционные системы, устройства и службы, которые не поддерживают возобновление EMS, могут проявлять проблемы, связанные с подключениями TLS. Обратитесь к администратору, изготовителю или поставщику услуг за обновлениями, которые полностью поддерживают возобновление EMS, как определено в RFC 7627.

Примечание. Корпорация Майкрософт не рекомендует отключать EMS. Если служба EMS была явным образом отключена ранее, ее можно снова включить, задав следующие значения в разделе реестра:

На сервере TLS — DisableServerExtendedMasterSecret: 0
На клиенте TLS — DisableClientExtendedMasterSecret: 0

Дополнительные сведения для администраторов

1. На устройстве с Windows, которое пытается установить TLS-подключение к устройству, которое не поддерживает Extended Master Secret (EMS), при согласовании комплектов шифров TLS_DHE_* может иногда возникать сбой, приблизительно в 1 попытке из 256. Чтобы устранить эту ошибку, реализуйте одно из следующих решений, указанных в порядке предпочтения.

Включите поддержку расширений Extend Master Secret (EMS) при выполнении TLS-подключений как в клиентской, так и в серверной операционной системе.

Для операционных систем, которые не поддерживают EMS, удалите комплекты шифров TLS_DHE_* из списка комплектов шифров в ОС клиентского устройства TLS. Инструкции о том, как это сделать в Windows, см в разделе Определение приоритета для комплектов шифров Schannel.

2. Операционные системы, которые отправляют сообщения запроса сертификата только в режиме полного подтверждения после возобновления, не соответствуют стандарту RFC 2246 (TLS 1.0) или RFC 5246 (TLS 1.2) и приводят к сбою каждого подключения. Возобновление не гарантируется в соответствии со спецификацией RFC, но оно может быть использовано по усмотрению клиента и сервера TLS. При возникновении этой проблемы необходимо обратиться к производителю или поставщику услуг за обновлениями, которые соответствуют стандартам RFC.

Читайте также:  Кнопки для восстановления windows acer

3. FTP-серверы или клиенты, не совместимые с RFC 2246 (TLS 1.0) и RFC 5246 (TLS 1.2), могут не передавать файлы при возобновлении или сокращенном подтверждении, и это приведет к сбою каждого подключения. При возникновении этой проблемы необходимо обратиться к производителю или поставщику услуг за обновлениями, которые соответствуют стандартам RFC.

Затронутые обновления

Эта проблема может возникать для любого последнего накопительного обновления (LCU) или ежемесячных накопительных пакетов, выпущенных 8 октября 2019 года или позже, для затронутых платформ:

KB4517389 LCU для Windows 10, версия 1903.

KB4519338 LCU для Windows 10 версии 1809 и Windows Server 2019.

KB4520008 LCU для Windows 10, версия 1803.

KB4520004 LCU для Windows 10, версия 1709.

KB4520010 LCU для Windows 10, версия 1703.

KB4519998 LCU для Windows 10 версии 1607 и Windows Server 2016.

KB4520011 LCU для Windows 10, версия 1507.

KB4520005 Ежемесячный накопительный пакет для Windows 8.1 и Windows Server 2012 R2.

KB4520007 Ежемесячный накопительный пакет обновления для Windows Server 2012.

KB4519976 Ежемесячный накопительный пакет для Windows 7 SP1 и Windows Server 2008 R2 SP1.

KB4520002 Ежемесячный накопительный пакет обновления для Windows Server 2008 SP2

Эта проблема может возникать для следующих обновлений системы безопасности, выпущенных 8 октября 2019 года, для затронутых платформ:

KB4519990 Обновление для системы безопасности для Windows 8.1 и Windows Server 2012 R2.

KB4519985 Обновление для системы безопасности для Windows Server 2012 и Windows Embedded 8 Standard.

KB4520003 Обновление для системы безопасности для Windows 7 SP1 и Windows Server 2008 R2 SP1

KB4520009 Обновление для системы безопасности Windows Server 2008 SP2

OpenVPN Support Forum

Community Support Forum

TLS Error: TLS handshake failed

TLS Error: TLS handshake failed

Post by Steeven » Mon May 28, 2018 3:31 pm

I try to connect to a Windows 2012 R2 Server hosted in VMWare from a Windows 10 Client. The firewalls are configured with the UDP and TCP ports number 1194 open and when I connect with OpenVPN I have the following messages : TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity); TLS Error: TLS handshake failed

Could you help me please?
Thanks

Re: TLS Error: TLS handshake failed

Post by bbuckm » Mon May 28, 2018 4:09 pm

Re: Doesn’t have a valide IP configuration

Post by Steeven » Wed May 30, 2018 3:05 pm

I find the reason of the previous error. The problem come from the TAP-WINDOWS Adapter (version 9) who doesn’t have a valid IP configuration. Instead of the re install, deactivation or reboot server, the issue is not resolved

If someone has an idea? Thanks

Re: TLS Error: TLS handshake failed

Post by TinCanTech » Wed May 30, 2018 3:26 pm

We have no information to work with .

Re: Doesn’t have a valide IP configuration

Post by bbuckm » Wed May 30, 2018 5:04 pm

Re: TLS Error: TLS handshake failed

Post by Steeven » Mon Jun 04, 2018 1:49 pm

Hi,
the issue is solved
the problem came from the firewall on the gateway who blocked the UDP protocol. I just need to declare the 1194 port with UDP protocol into the gateway config panel (in a local network) or declare the public IP of the OpenVPN server with the same port for UDP protocol.

Fix ‘TLS Error: TLS handshake failed’ on OpenVPN client

I am configuring OpenVPN 2.3.6-1 on my Arch Linux server in order to encrypt SMB traffic over the public Internet. When I test the setup on one of my Linux virtual machine clients, I get the error: TLS Error: TLS handshake failed .

I quickly read (OpenVPN on OpenVZ TLS Error: TLS handshake failed (google suggested solutions not helping)) and tried to switch from the default UDP to TCP, but that only caused the client to repeatedly report that the connection timed out. I also tried disabling the cipher and TLS authentication, but that caused the server to fail with Assertion failed at crypto_openssl.c:523 . In both instances, the required changes were made to both the client and server configurations.

I have been following the instructions at (https://wiki.archlinux.org/index.php/OpenVPN) to set up OpenVPN and the instructions at (https://wiki.archlinux.org/index.php/Create_a_Public_Key_Infrastructure_Using_the_easy-rsa_Scripts) to create the keys and certificates. The only deviations I have made from these instructions have been specifying my own computers’ names and their corresponding key/certificate file names.

See also my original question about securing SMB traffic over the Internet: (Simple encryption for Samba shares)

Can anybody explain how I can solve this issue?

Server: Arch Linux (up to date) connected directly to gateway via ethernet cable. No iptables.

Client: Arch Linux (up to date) virtual machine on VirtualBox 4.3.28r100309 Windows 8.1 host, bridged network adapter. No iptables. Windows Firewall disabled.

Gateway: Port forwarding for port 1194 enabled, no firewall restrictions.

Here are the configuration files on the server and client, respectively. I created these according to the instructions on the Arch Wiki.

/etc/openvpn/server.conf (Non-comment lines only):

/etc/openvpn/client.conf (Non-comment lines only):

Here are the outputs of running openvpn on the machines with the above configurations. I started the server first, then the client.

Tls error tls handshake failed windows

Fri Aug 22, 2014 6:31 pm

I am pretty sure there is a problem with OpenVPN Server running on RouterOS when you choose «require-client-certificate» .

I tested several times using different chain of certificates.

The weird thing is that if you try the same configuration and certificates on version 5.26 (OpenVPN Server) it works, but when you do the same on version 6.18 it does not work.

Error: «TLS failed».

I test with two types of OpenVPN clients: RouterOS and Windows. The result is the same.

The certificates are signed by the same CA.

I imported the CA, the client and server certificate (including the private keys of each one) to each RouterOS and make sure that the NTP client was updated correctly. But the result is the same: TLS failed.

I tested with:
— My own certificates
— CACert
— GoDaddy

None of them works.

Any advice?, someone test it?, maybe I am doing something wrong with de certificates.

Re: OpenVPN Server error: TLS failed

Fri Aug 22, 2014 6:39 pm

Note:

If I uncheck «require-client-certificate» it works.

Re: OpenVPN Server error: TLS failed

Fri Aug 22, 2014 6:52 pm

If I were you I wouldnt share private key files publicly.

Hence, they are called private keys.

Re: OpenVPN Server error: TLS failed

Fri Aug 22, 2014 8:35 pm

Re: OpenVPN Server error: TLS failed

Fri Aug 22, 2014 11:55 pm

Yes I have the same problem since v6.9+.

but so far no answer to this problem

Re: OpenVPN Server error: TLS failed

Mon Aug 25, 2014 8:52 pm

New OpenVPN server configured in 6.18 router confirmed working here with Require Client Certificate checked, using self-signed certificates generated by XCA in Ubuntu. Testing client was OpenVPN GUI software client for Windows (OpenVPN.net).

This might not be your problem, but make sure your certificates (both CA and server) are present, and show status KAT for CA, and KT for server. The TLS error will occur at the client if the certificates have been imported into the server router but the associated key (PEM) files have not been imported/applied. In that case you don’t see the K in the certificate status line.

I find the verbose output of the OpenVPN client for Windows running in a terminal window (instead of using the GUI) helpful for troubleshooting.

Читайте также:  Когда представили windows 10

Re: OpenVPN Server error: TLS failed

Tue Aug 26, 2014 5:56 pm

Thank you for your answer.

There must something with the certificate chain or the CRL.

Re: OpenVPN Server error: TLS failed

Tue Aug 26, 2014 6:46 pm

Another problem: after successful implementation generating the certificates on one RouterOS, when I try to use the exported certificates with OVPN (require-client-certificate checked) in another RouterOS (including all the private keys) the error appear again: «TLS FAILED».

Re: OpenVPN Server error: TLS failed

Tue Aug 26, 2014 7:16 pm

Found the problem. When set the CRL it does not work. If skip the CRL then it works.

Tested on several RouterBoards and x86.

Re: OpenVPN Server error: TLS failed

Tue Aug 26, 2014 7:50 pm

Confirmed. The problem happened when you set the CRL on the certificates.

Tested on several RouterBoards and it works without using CRL .

The certificates were generated by: OpenSSL and RouterOS (with bought works)

Re: OpenVPN Server error: TLS failed

Wed Oct 01, 2014 6:09 pm

I can confirm that problem. In my environment RB2011 works as OVPN server, windows clients. Certificates were generated in Microsoft CA (Windows Server 2008 R2) and in second environment on OpenSSL.
If CRL is defined and option require-client-certificate is set then clients can not establish connection.

I tried to develop problem two times when I found it after upgrade (from 6.1 to 6.15) and after that when I’ve build from scratch separate clean environment for this test. So it is not bad luck.
I checked that CRL file is downloaded from my CRL distribution point.
If I generate certificate without CRL option it works with option: require-client-certificate.
For now I’ve tested RouterOS: 6.15, 6.18, 6.19

Problem was send to Mikrotik:
[Ticket#2014082766000625]

If anyone have any idea how to develop this problem i can do more tests.

EDIT:
For now I’ve tested RouterOS: 6.15, 6.18, 6.19, 6.20

Re: OpenVPN Server error: TLS failed

Mon Oct 13, 2014 8:56 am

Re: OpenVPN Server error: TLS failed

Mon Oct 13, 2014 8:58 am

Re: OpenVPN Server error: TLS failed

Tue Oct 14, 2014 5:10 am

Guys, this is my first time trying to get OpenVPN setup on my Mikrotik.
I’ve read through the Wiki and I find the information vague and haven’t had success.
Can someone provide me a concise guide to setting up OpenVPN?

The Mikrotik router is 10.0.10.1.

I’m confused about generating certificates. Can I just create them on the router?

I’ve also found this thread and am thinking to myself «Oh great, I can’t tell if it’s my unfamiliarity with RouterOS or a bug in the software.»

Re: OpenVPN Server error: TLS failed

Tue Oct 14, 2014 2:19 pm

Using RouterOS 6.20 you can execute the following commands on the MikroTik server:

We will create two client certificates at this time (you can add more lately)

/certificate
add name=ca-template common-name=myCa key-usage=key-cert-sign,crl-sign
add name=server-template common-name=server
add name=client1-template common-name=client1
add name=client2-template common-name=client2

/certificate
sign ca-template name=myCa
sign ca=myCa server-template name=server
sign ca=myCa client1-template name=client1
sign ca=myCa client2-template name=client2

/certificate
set myCa trusted=yes
set server trusted=yes

At this time you have all you need at your server. Now you have to export the CA and the client certificates that you need to import to the client:

/certificate export-certificate myCa
/certificate export-certificate client1 export-passphrase=xxxxxxxx
/certificate export-certificate client2 export-passphrase=xxxxxxxx

Go to /files and download the files just exported.

Re: OpenVPN Server error: TLS failed

Fri Oct 17, 2014 2:21 pm

Re: OpenVPN Server error: TLS failed

Fri Oct 17, 2014 2:26 pm

Which version are you using?
I use version 6.20. In version 6.19 is different.

Re: OpenVPN Server error: TLS failed

Fri Oct 17, 2014 2:34 pm

Re: OpenVPN Server error: TLS failed

Fri Oct 17, 2014 2:50 pm

Re: OpenVPN Server error: TLS failed

Mon Oct 20, 2014 10:19 am

Re: OpenVPN Server error: TLS failed

Mon Oct 20, 2014 2:22 pm

Are you following the instructions?
Are you using your own certificates?
Can you post what are you doing and error?

Re: OpenVPN Server error: TLS failed

Tue Oct 21, 2014 2:32 pm

Re: OpenVPN Server error: TLS failed

Tue Oct 21, 2014 2:40 pm

that is openvpn client log

Tue Oct 21 15:36:16 2014 OpenVPN 2.3.4 i686-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on Aug 7 2014
Tue Oct 21 15:36:16 2014 library versions: OpenSSL 1.0.1i 6 Aug 2014, LZO 2.05
Enter Management Password:
Tue Oct 21 15:36:16 2014 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25341
Tue Oct 21 15:36:16 2014 Need hold release from management interface, waiting.
Tue Oct 21 15:36:16 2014 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25341
Tue Oct 21 15:36:16 2014 MANAGEMENT: CMD ‘state on’
Tue Oct 21 15:36:16 2014 MANAGEMENT: CMD ‘log all on’
Tue Oct 21 15:36:16 2014 MANAGEMENT: CMD ‘hold off’
Tue Oct 21 15:36:16 2014 MANAGEMENT: CMD ‘hold release’
Tue Oct 21 15:36:16 2014 WARNING: —ping should normally be used with —ping-restart or —ping-exit
Tue Oct 21 15:36:16 2014 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
Tue Oct 21 15:36:22 2014 MANAGEMENT: CMD ‘password [. ]’
Tue Oct 21 15:36:22 2014 Socket Buffers: R=[8192->8192] S=[8192->8192]
Tue Oct 21 15:36:22 2014 Attempting to establish TCP connection with [AF_INET]10.32.0.150:3128
Tue Oct 21 15:36:22 2014 MANAGEMENT: >STATE:1413891382,TCP_CONNECT.
Tue Oct 21 15:36:22 2014 TCP connection established with [AF_INET]10.32.0.150:3128
Tue Oct 21 15:36:22 2014 Send to HTTP proxy: ‘CONNECT xxxxxxxxxx:1194 HTTP/1.0’
Tue Oct 21 15:36:23 2014 HTTP proxy returned: ‘HTTP/1.0 200 Connection established’
Tue Oct 21 15:36:23 2014 TCPv4_CLIENT link local: [undef]
Tue Oct 21 15:36:23 2014 TCPv4_CLIENT link remote: [AF_INET]10.32.0.150:3128
Tue Oct 21 15:36:23 2014 MANAGEMENT: >STATE:1413891383,WAIT.
Tue Oct 21 15:36:23 2014 MANAGEMENT: >STATE:1413891383,AUTH.
Tue Oct 21 15:36:23 2014 TLS: Initial packet from [AF_INET]10.32.0.150:3128, sid=753f7c6c e4852c1c
Tue Oct 21 15:36:23 2014 VERIFY OK: depth=1, CN=myCa
Tue Oct 21 15:36:23 2014 VERIFY OK: depth=0, CN=server
Tue Oct 21 15:37:23 2014 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Tue Oct 21 15:37:23 2014 TLS Error: TLS handshake failed
Tue Oct 21 15:37:23 2014 Fatal TLS error (check_tls_errors_co), restarting
Tue Oct 21 15:37:23 2014 SIGUSR1[soft,tls-error] received, process restarting
Tue Oct 21 15:37:23 2014 MANAGEMENT: >STATE:1413891443,RECONNECTING,tls-error,,
Tue Oct 21 15:37:23 2014 Restart pause, 5 second(s)
Tue Oct 21 15:37:26 2014 MANAGEMENT: Client disconnected

Re: OpenVPN Server error: TLS failed

Tue Oct 21, 2014 2:51 pm

Here is my OVPN Client configuration for Windows:

remote xxx.xxx.xxx.xxx 443
proto tcp-client
#client
tls-client
#ns-cert-type server
#remote-cert-tls server
ca cert_export_myCa.crt
cert cert_export_client1.crt
key cert_export_client1.key
cipher AES-256-CBC
auth SHA1
dev tap
resolv-retry infinite
nobind
persist-key
ping 10
ping-restart 45
verb 4
auth-user-pass
#auth-nocache
route-method exe
route-delay 2
pull
#redirect-gateway def1
route 10.0.0.0 255.0.0.0
route 172.16.0.0 255.240.0.0
route 192.168.0.0 255.255.0.0

I created some test certificates for you: www.mkx.cl/crt/crt_alexac.zip

Please test it and tell me if works.

Re: OpenVPN Server error: TLS failed

Thu Oct 23, 2014 8:10 am

ok, i find the problem)
i haven’t «auth-user-pass» in my client config.
i still use my certs created in routeros.
now i can connect to mikrotik, ping server from my local network, but can’t ssh to it.
do i need add some forward rules for it on mikrotik?

Читайте также:  Что такое windows gpu

that’s my ovpn client config
————-
# OpenVPN Client conf
# client

nobind
persist-key
persist-tun

http-proxy-retry
http-proxy 10.32.0.150 3128

tls-client
# tls-remote xxxxxxxxxxxxxxxxxxxxxxxxx

ca myCa.crt
cert client.crt
key client.key

remote xxxxxxxxxxxxxxxxxxxx 1194
dev tun
# dev tap
proto tcp-client
# proto udp

cipher AES-256-CBC
auth SHA1
verb 4
ping 10
ping-restart 45
# ns-cert-type server
# comp-lzo

auth-user-pass auth.cfg
# auth-nocache

pull
route-method exe
route-delay 2
route 192.168.101.0 255.255.255.0

Re: OpenVPN Server error: TLS failed

Thu Oct 23, 2014 2:21 pm

Re: OpenVPN Server error: TLS failed

Thu Oct 23, 2014 5:43 pm

Re: OpenVPN Server error: TLS failed

Mon Oct 27, 2014 4:12 pm

Hello,
apteixeira thank you for your help.
I have a question about generating certificates by OpenSSL. Generated by the user http://wiki.mikrotik.com/wiki/Manual:Cr . rtificates and I can not join it. I do not have a flag KR, only KT.

Can I somehow get rid of the password on the certificate? In addition to the username / password I have to enter the password for the certificate yet

Taking this opportunity I have a question about the fairly slow connection, the suspension at this step:

Re: OpenVPN Server error: TLS failed

Wed Oct 29, 2014 5:18 pm

The possible reason for «do not have a flag KR, only KT» may be because you are not importing the key of the certificate. On the server you need to install de complete chain and the server key.

To avoid «enter the password for the certificate» you have to decrypt the rsa private key.

To avoid Man-in-the-Middle (no server certificate verification method has been enabled) you have to implement some kind of server certificate verification by clients. You can find information bout it here: http://openvpn.net/index.php/open-sourc . .html#mitm

There is nothing wrong here:

Re: OpenVPN Server error: TLS failed

Wed Oct 29, 2014 6:06 pm

Re: OpenVPN Server error: TLS failed

Wed Oct 29, 2014 6:12 pm

The files are you using are ok for the server.

Yes you can decrypt the rsa private key using openssl. Here is an example: https://support.citrix.com/article/CTX122930/

Re: OpenVPN Server error: TLS failed

Wed Nov 05, 2014 5:31 pm

Re: OpenVPN Server error: TLS failed

Wed Nov 12, 2014 9:12 pm

Re: OpenVPN Server error: TLS failed

Sun Jan 24, 2016 8:30 pm

Hello,
I try to set up an openvpn server on microtik and after i fallowed all in this topic i get tls error.
I will post my configs and logs maybe someone can point me where i`m wrong.

20:20:38 ovpn,debug,error,20076,29312,60348,61328,27884,20684,58064,60344,l2tp,info,60348,debug,79,65535,critical,8976,62372,29584,20008,20760,31112,29312,20148,20144,20684,
41904,20684,packet duplicate packet, dropping
20:20:38 ovpn,debug,packet rcvd P_CONTROL kid=0 sid=35e032ad92ca5c6b pid=1 DATA len=293
20:20:38 ovpn,debug,packet sent P_ACK kid=0 sid=9a7e849ce3139b68 [1 sid=35e032ad92ca5c6b] DATA len=0
20:20:38 ovpn,debug,packet sent P_CONTROL kid=0 sid=9a7e849ce3139b68 pid=1 DATA len=933
20:20:38 ovpn,debug : disconnected

20:20:43 ovpn,info TCP connection established from 10.10.10.3
20:20:43 ovpn,debug,packet sent P_CONTROL_HARD_RESET_SERVER_V2 kid=0 sid=156fd32f2dee8e68 pid=0 DATA len=0
20:20:44 ovpn,debug,packet rcvd P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 sid=effd2eb77764ddc4 pid=0 DATA len=0
20:20:44 ovpn,debug,packet sent P_ACK kid=0 sid=156fd32f2dee8e68 [0 sid=effd2eb77764ddc4] DATA len=0
20:20:44 ovpn,debug,packet rcvd P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 sid=effd2eb77764ddc4 [0 sid=156fd32f2dee8e68] pid=0 DATA len=0
20:20:44 ovpn,debug,error,20076,29312,60348,61328,27884,20684,58064,60344,l2tp,info,60348,debug,79,65535,critical,8976,62372,29584,20008,20760,31112,29312,20148,20144,20684,
41904,20684,packet duplicate packet, dropping
20:20:44 ovpn,debug,packet rcvd P_CONTROL kid=0 sid=effd2eb77764ddc4 pid=1 DATA len=293
20:20:44 ovpn,debug,packet sent P_ACK kid=0 sid=156fd32f2dee8e68 [1 sid=effd2eb77764ddc4] DATA len=0
20:20:44 ovpn,debug,packet sent P_CONTROL kid=0 sid=156fd32f2dee8e68 pid=1 DATA len=933
20:20:44 ovpn,debug : disconnected

20:20:49 ovpn,info TCP connection established from 10.10.10.3
20:20:49 ovpn,debug,packet sent P_CONTROL_HARD_RESET_SERVER_V2 kid=0 sid=e91b8bfe5da9ee27 pid=0 DATA len=0
20:20:50 ovpn,debug,packet rcvd P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 sid=35efaf7d447f6c7 pid=0 DATA len=0
20:20:50 ovpn,debug,packet sent P_ACK kid=0 sid=e91b8bfe5da9ee27 [0 sid=35efaf7d447f6c7] DATA len=0
20:20:50 ovpn,debug,packet rcvd P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 sid=35efaf7d447f6c7 [0 sid=e91b8bfe5da9ee27] pid=0 DATA len=0
20:20:50 ovpn,debug,error,20076,29312,60348,61328,27884,20684,58064,60344,l2tp,info,60348,debug,79,65535,critical,8976,62372,29584,20008,20760,31112,29312,20148,20144,20684,
41904,20684,packet duplicate packet, dropping
20:20:50 ovpn,debug,packet rcvd P_CONTROL kid=0 sid=35efaf7d447f6c7 pid=1 DATA len=293
20:20:50 ovpn,debug,packet sent P_ACK kid=0 sid=e91b8bfe5da9ee27 [1 sid=35efaf7d447f6c7] DATA len=0
20:20:50 ovpn,debug,packet sent P_CONTROL kid=0 sid=e91b8bfe5da9ee27 pid=1 DATA len=933
20:20:50 ovpn,debug : disconnected

20:20:56 ovpn,info TCP connection established from 10.10.10.3
20:20:56 ovpn,debug,packet sent P_CONTROL_HARD_RESET_SERVER_V2 kid=0 sid=9986814ecf7f806a pid=0 DATA len=0
20:20:56 ovpn,debug,packet rcvd P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 sid=d899584ffaf3574 pid=0 DATA len=0
20:20:56 ovpn,debug,packet sent P_ACK kid=0 sid=9986814ecf7f806a [0 sid=d899584ffaf3574] DATA len=0
20:20:56 ovpn,debug,packet rcvd P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 sid=d899584ffaf3574 [0 sid=9986814ecf7f806a] pid=0 DATA len=0
20:20:56 ovpn,debug,error,20076,29312,60348,61328,27884,20684,58064,60344,l2tp,info,60348,debug,79,65535,critical,8976,62372,29584,20008,20760,31112,29312,20148,20144,20684,
41904,20684,packet duplicate packet, dropping
20:20:56 ovpn,debug,packet rcvd P_CONTROL kid=0 sid=d899584ffaf3574 pid=1 DATA len=293
20:20:56 ovpn,debug,packet sent P_ACK kid=0 sid=9986814ecf7f806a [1 sid=d899584ffaf3574] DATA len=0
20:20:56 ovpn,debug,packet sent P_CONTROL kid=0 sid=9986814ecf7f806a pid=1 DATA len=933
20:20:57 ovpn,debug : disconnected

Windows client config

##############################################
# Sample client-side OpenVPN 2.0 config file #
# for connecting to multi-client server. #
# #
# This configuration can be used by multiple #
# clients, however each client should have #
# its own cert and key files. #
# #
# On Windows, you might want to rename this #
# file so it has a .ovpn extension #
##############################################

# Specify that we are a client and that we
# will be pulling certain config file directives
# from the server.
client

# Use the same setting as you are using on
# the server.
# On most systems, the VPN will not function
# unless you partially or fully disable
# the firewall for the TUN/TAP interface.
;dev tap
dev tun

# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel
# if you have more than one. On XP SP2,
# you may need to disable the firewall
# for the TAP adapter.
dev-node MyTap

# Are we connecting to a TCP or
# UDP server? Use the same setting as
# on the server.
proto tcp
;proto udp

# The hostname/IP and port of the server.
# You can have multiple remote entries
# to load balance between the servers.
remote kiaunel.fiberdatatelecom.ro 1194
;remote my-server-2 1194

# Choose a random host from the remote
# list for load-balancing. Otherwise
# try hosts in the order specified.
;remote-random

# Keep trying indefinitely to resolve the
# host name of the OpenVPN server. Very useful
# on machines which are not permanently connected
# to the internet such as laptops.
resolv-retry infinite

# Most clients don’t need to bind to
# a specific local port number.
nobind

# Downgrade privileges after initialization (non-Windows only)
;user nobody
;group nobody

# Try to preserve some state across restarts.
persist-key
persist-tun

# If you are connecting through an
# HTTP proxy to reach the actual OpenVPN
# server, put the proxy server/IP and
# port number here. See the man page
# if your proxy server requires
# authentication.
;http-proxy-retry # retry on connection failures
;http-proxy [proxy server] [proxy port #]

# Wireless networks often produce a lot
# of duplicate packets. Set this flag
# to silence duplicate packet warnings.
;mute-replay-warnings

# SSL/TLS parms.
# See the server config file for more
# description. It’s best to use
# a separate .crt/.key file pair
# for each client. A single ca
# file can be used for all clients.
ca myCa.crt
cert client.crt
key client.key

# Verify server certificate by checking that the
# certicate has the correct key usage set.
# This is an important precaution to protect against
# a potential attack discussed here:
# http://openvpn.net/howto.html#mitm
#
# To use this feature, you will need to generate
# your server certificates with the keyUsage set to
# digitalSignature, keyEncipherment
# and the extendedKeyUsage to
# serverAuth
# EasyRSA can do this for you.
remote-cert-tls server

# If a tls-auth key is used on the server
# then every client must also have the key.
;tls-auth ta.key 1

# Select a cryptographic cipher.
# If the cipher option is used on the server
# then you must also specify it here.
;cipher AES 128

# Enable compression on the VPN link.
# Don’t enable this unless it is also
# enabled in the server config file.
;comp-lzo

# Set log file verbosity.
verb 5

# Silence repeating messages
;mute 20

Оцените статью