Openvpn ошибка не удалось подключиться

OpenVPN — очень популярная программа для организации виртуальных сетей и VPN-серверов. Это очень удобно, так как вы можете объединить несколько компьютеров, находящихся в разных концах мира в одну виртуальную локальную сеть и для операционной системы всё будет выглядеть так, как будто эти компьютеры действительно находятся в одной локальной сети.

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

1. Сервис запущен?

Если вы только что установили и настроили OpenVPN, убедитесь, что его сервис запущен и работает. Если сервер не запущен, то, как правило, при попытке подключения вы будете получать ошибку «Connection refused». Для проверки выполните:

sudo systemctl status openvpn

В некоторых случаях сервис запускается с определённым конфигом. Тогда для проверки нужно указать этот конфигурационный файл:

sudo systemctl status openvpn@имя_конфига

Также вы можете посмотреть, слушает ли сервис подключения на порту OpenVPN:

ss -tlpn | grep openvpn

2. Открыт порт?

Если сервис запущен и слушает подключения на 1194 порту, а вы всё ещё не можете подключится, убедитесь, что этот порт не защищён брандмауэром на сервере. Для этого просто пробуем подключится к нему с помощью telnet:

telnet ip_сервера 1194

Когда всё хорошо, утилита сообщит об успешном подключении:

Если вы получаете такую же ошибку — «Connection refused» — или просто долго идёт подключение, но сервис запущен, значит порт закрыт. Открыть порт в Ubuntu можно с помощью команды:

sudo ufw allow 1194

А в CentOS:

sudo firewall-cmd --zone=trusted --add-service openvpn
sudo firewall-cmd --zone=trusted --add-service openvpn --permanent

Теперь можете снова попробовать подключаться к вашему OpenVPN-серверу и теперь всё должно заработать.

3. Соответствуют ли настройки?

Если сервер запущен и доступен извне, но вы всё ещё не можете подключится, то проверьте, соответствуют ли клиентская сторона настройкам сервера. Обратите внимание на тип подключения — tcp это или udp? Также обратите внимание на настройки шифрования и сжатия, особенно tls и comp-lzo. Все настройки, касающиеся подключения, должны быть одинаковыми как в конфигурационном файле клиента, так и сервера.

4. Используете ли правильные ключи?

Если вы подписывали ключи вручную, без использования какого-либо автоматического скрипта настройки OpenVPN, и поэтому они находятся в отдельных файлах от клиентского конфигурационного файла, тогда проверьте, используете ли вы правильные ключи и правильно ли они подписаны. Обычно при проблемах с ключами всё это очень хорошо видно в лог-файле OpenVPN. Но об этом позже. Попробуйте подписать ключи ещё раз.

5. Стабильная сеть?

Если OpenVPN подключается, но подключение постоянно разрывается, причиной этому может стать нестабильная сеть. Если вы знаете, что сеть у вас не очень стабильная или сильно загружена, уберите эти опции из конфигурационного файла клиента:

sudo vi /etc/openvpn/server.conf

#ping 5
#ping-restart 10

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

6. Проанализируйте лог файл

Если вам всё ещё не удалось выяснить, почему не работает подключение, значит это что-то более серьёзное и без анализа лог-файла вам не обойтись. При подключении в терминале клиента вы обычно будете получать примерно одну и ту же ошибку:

SIGUSR1[soft,connection-reset] received, process restarting

Более подробную информацию можно взять из лог-файла сервера. Лог-файл настраивается директивой log-append в конфигурационном файле сервера, обычно это /var/log/openvpn.log.

По умолчанию уровень логирования равен трём. На этом уровне вы мало что сможете понять. Вам нужен уровень 9, максимальный. Поэтому откройте конфигурационный файл и приведите настройки логирования к такому виду:

log-append /var/log/openvpn.log
verb 9

Теперь перезапустите OpenVPN:

sudo systemctl restart openvpn@имя_конфига

Откройте лог-файл и попробуйте снова подключится:

tail -f /var/log/openvpn.log

Здесь вы увидите очень много информации, просмотрите её внимательно и найдите, где именно находится проблема. Обычно программа сама говорит где проблема и как её решить. Главное, потом не забудьте вернуть значение параметра verb по умолчанию (3) иначе лог-файл очень быстро займёт всё свободное место на жёстком диске.

7. Два пользователя одновременно

Если по одному и тому же конфигурационному файлу пытаются подключится два или больше пользователей одновременно, то OpenVPN примет только одно подключение, а все остальные будет сбрасывать. Это поведение можно изменить, добавив к конфигурации сервера строчку:

duplicate-cn

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

8. Истек срок действия crl

CRL — это список отозванных сертификатов. Этот файл имеет свой срок действия, и он может истекать. Если это произойдёт, то в логе вы найдёте ошибку «CRL has expired». Для быстрого её решения можно просто закомментировать строчку:

crl-verify crl.pem

Но тогда отозванные сертификаты перестанут быть отозванными. Другой вариант — это создать этот файл заново. Если у вас установлен пакет скриптов EasyRSA, который, обычно, автоматически устанавливается вместе с OpenVPN, то сделать это очень просто. Перейдите в папку со скриптами:

cd /etc/openvpn/easyrsa/

И выполните:

./easyrsa gen-crl

Затем скопируйте полученный файл в папку с файлами OpenVPN:

cp /etc/openvpn/easy-rsa/pki/crl.pem /etc/openvpn/crl.pem

Готово, теперь у вас всё будет работать.

9. Сервер перегружен

Если вы не можете подключится или подключение разрывается, причиной этому может стать недостаточное количество ресурсов на сервере. Убедитесь, что сервер ничем не перегружен, а на жёстком диске есть свободное место.

Выводы

Сегодня мы разобрали несколько причин, почему может возникнуть ошибка «не удалось подключиться к OpenVPN». Конечно, это только самые простые проблемы, и при более серьёзном использовании программы можно столкнутся с более крупными проблемами. Какие казусы с подключением к OpenVPN вам приходилось решать? Напишите свои варианты решений в комментариях!

Обнаружили ошибку в тексте? Сообщите мне об этом. Выделите текст с ошибкой и нажмите Ctrl+Enter.

Creative Commons License

Статья распространяется под лицензией Creative Commons ShareAlike 4.0 при копировании материала ссылка на источник обязательна .

Purpose of this troubleshooting page

This page is specifically about attempting to find and resolve problems with an OpenVPN client program failing to connect to an OpenVPN Access Server. It does not deal with problems in reaching a target system over the established VPN tunnel once the VPN tunnel is already working. That is handled in a separate page: troubleshooting reaching systems over the VPN tunnel.

So if for example you start the OpenVPN client connection and it issues an error and disconnects you, then the information here should help you in determining a possible cause and solution. If not, reach out to us on the support ticket system and provide as much detail as you can.

Locating the server log files

To diagnose problems with an OpenVPN server or client, it is helpful to look at the log files. The log files are located in specific areas on your computer systems, and the following is a general guide on how to find them and how to get the best information out of them. Log files are the place to check whenever you’re having any problems making a connection with an OpenVPN client program to the OpenVPN Access Server, they the information needed to ascertain what’s going wrong.

On the OpenVPN Access Server there is the server side log:
/var/log/openvpnas.log /var/log/openvpnas.node.log (in case of a failover setup)

In the event that you are having problems with starting the Access Server or certain portions of it, for example the web services, then it may be useful to stop the Access Server service, move the log file aside, then start the Access Server service, and stop it again immediately. This creates a new clean log file that contains the startup and shutdown sequence of the Access Server and no other extraneous information. This makes analysis of the log file much easier. To do so use these commands in order:

service openvpnas stop
mv /var/log/openvpnas.log /var/log/openvpnas.log.old
service openvpnas start
service openvpnas stop

You can then grab the /var/log/openvpnas.log file for analysis and start the Access Server again:

service openvpnas start

Locating the client log files

Log file location for the OpenVPN Connect Client for Windows:
C:Program Files (x86)OpenVPN TechnologiesOpenVPN Clientetclogopenvpn_(unique_name).log

The OpenVPN Connect Client for Mac:
/Library/Application Support/OpenVPN/log/openvpn_(unique_name).log

Macintosh may not show you this folder in finder as it only shows you certain things and hides others. So to get to the /Library folder, open Finder and in the menu at the top choose Go followed by Go to folder and then enter the path /Library to get into that directory. You can then go to the correct folder and look up the log file. Please also note that the OpenVPN Connect Client for Macintosh will have permissions set on the log file so that you cannot normally open it. To bypass this, right click the log file and choose the Get info option in the menu. Then at the bottom, under Sharing & Permissions, you will be able to use the yellow padlock icon to unlock the settings and to give everyone read access. Then you will be able to open the log file with a right click and selecting Open with and then choosing something like Text editor to view the contents of the log file.

Known error messages and possible solutions

TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)

This particular error can have multiple different causes as it is a fairly generic error message.
A possible explanation is that the client program is old and supports only TLS 1.0, but the server is expecting TLS level 1.1 or higher. To see if this is the case log on to the server and check the server side log file. The chances are high that your client program is an older version, like version 2.2 or older, and that it doesn’t know how to handle a modern TLS minimum level requirement, when you see messages that look like this on the server side:

OpenSSL: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol'
TLS_ERROR: BIO read tls_read_plaintext error'
TLS Error: TLS object -> incoming plaintext read error'
TLS Error: TLS handshake failed'
SIGUSR1[soft,tls-error] received, client-instance restarting'

The solution to this particular problem is to upgrade the client software to the latest version.
Another possible explanation is that the settings regarding TLS minimum requirement level have been altered but the OpenVPN client is using an older copy of the connection profile which has incorrect instructions. The settings on the client and the server must match for the connection to be successful. In this situation installing a new copy of the configuration profile will solve the issue. A complete uninstall, redownload, and reinstall of the OpenVPN Connect Client should take care of that for you.

And yet another possible explanation is that there is a blockade in place in a firewall or at the Internet service provider that is blocking or interfering with the TLS handshake in some way.

TLS Error: local/remote TLS keys are out of sync

For some reason the negotiated TLS key to be used on the client side for TLS encryption/decryption is different from the one used on the server side. That should never happen. When the client and server are talking to one another they agree upon a TLS key to be used for encrypting and decrypting traffic. By default in Access Server such a key is valid for 6 hours, and after those 6 hours, automatically the TLS refresh kicks in and they will agree upon a new key. There is a short overlap where both the old and new key are accepted, until the old key is expired and the new key must be used. If for some reason one side doesn’t do this, you see this error message.

A possible cause is a bug in the OpenVPN protocol with the version used in OpenVPN Connect Client which was resolved, where the automatic TLS key refresh would fail because the client and server couldn’t agree properly on the encryption cipher to use. So if you encounter this particular problem and you are using an OpenVPN3 based client like OpenVPN Connect Client 2.*, then consider updating to the latest version. You can do so for example per computer by downloading OpenVPN Connect Client for Windows or OpenVPN Connect Client for macOS from our website, and installing it. However a better solution would be to update your Access Server to the latest version so that you get the updated Connect Client embedded in there, and then downloading and installing the latest version of OpenVPN Connect Client from your Access Server. If you use other client software and it shows problems, try finding a newer version for it. Worst case scenario, you could also consider changing the TLS key refresh to something larger in the Advanced VPN page of the Admin UI, to avoid triggering the issue. This does of course lower security somewhat.

Server poll timeout

One of the very first steps that an OpenVPN client program will do when trying to connect to an OpenVPN Access Server is to simply send out a message requesting for a reply. So basically a «hello are you there?» message. The server is then supposed to respond and then a connection is started. However if you see a server poll timeout error message then the server could not be reached at the specified port. Why this is not possible is another question entirely, but the error message is very clear: there is simply no response at all on that address and port. So when you see this message it would be good to check if the port is actually open, if the port is correct, if the address you’re trying to reach can actually be reached from the Internet, and isn’t a private IP address only, and other such checks to confirm basic connectivity to the server. At this point you’re not even looking at a problem that has anything to do with the OpenVPN protocol itself. This is a most basic «this server cannot be reached» message.

A common mistake that is made is that people set up the Access Server on a private IP address but neglect to set up a proper FQDN DNS name for it, and configure that FQDN DNS name in the Admin UI under Server Network Settings in the Host name or IP address field. It is that field value that connection profiles generated and provisioned to the OpenVPN clients will be using to start a connection to. So if this is set to an internal private IP address that the Access Server was installed on, then the connection profiles will try to connect to that private IP address, which is unlikely to be reachable from anywhere else but the internal network that the Access Server itself is on. The solution is to set up a proper DNS name and configure that and save settings. Then uninstall, redownload, and reinstall the connection profile or OpenVPN Connect Client program and to try again.

Another common mistake is to forget to open the 3 ports required for OpenVPN Access Server to be reachable properly. By default these are TCP 443, TCP 943, and UDP 1194.

SESSION_ID only allowed to be used by client IP address that created it

OpenVPN Access Server uses a session-based-token system for server-locked and user-locked profiles. Auto-login type profiles don’t. What this means is that after a user authenticates successfully, they are given a session token to identify themselves with. Compare it to going to a party and you show up and pay your entry fees, and if you need to go out for a little bit, they give you a stamp on the back of your hand, or put a paper/plastic strip around your wrist, so that you can show up again later and be admitted access again. That’s a very simplified explanation. With a session token, each token is unique and uniquely identifies you. This avoids having to store your credentials in memory or bothering the user to reauthenticate when you temporarily lose contact with the server and reconnect again, so it’s safer and more convenient. The session token is locked to the IP address that the original authentication attempt was made from, this is a security feature. When you see this message it means the session token your client program offered to the server was generated originally from another IP address. This can happen for example if you switch Internet connection, like logging in at work, then moving your laptop home and it tries to reconnect automatically with the session token. This session token IP lock is a security feature that can be disabled to allow such automatic reconnects to occur without this error message.

Authentication Error: Session: your session has expired, please reauthenticate

The OpenVPN Access Server works with a session token based authentication system when you are using a server-locked or user-locked profile. When you authenticate successfully, you are given a session token instead. The session token identifies you now from that moment onward. By default the session token expires after 5 minutes of inactivity as in not being connected to the server, and it also expires after 24 hours by default. Furthermore, when the session token is generated on the server, it gets locked to the VPN client’s connecting IP address. This session IP lock can be disabled, and the timeout for session inactivity and the timeout for total session duration mentioned can also be adjusted. If for example you are on your phone and you are connected through WiFi, and you walk out of range of WiFi, and it switches to another Internet connection like 3G/4G or something, then your VPN client will disconnect but attempt to reconnect automatically. Your IP will now be different and as such the session token is not valid anymore. You will see an error like in the previous section in the server side log file (SESSION_ID only allowed to be used by client IP address that created it). And if your connection has lasted 24 hours in total, then it will also disconnect you if you’re on a session-based connection with server-locked or user-locked profile. The solution is to either use an auto-login type profile or to increase the session token duration.

unable to obtain session ID from vpn.yourserver.com, ports=443: (error description here)

This error message can be found in the capi.log file and also shown in the popup message in Windows or macOS when you use OpenVPN Connect Client for Windows or macOS. This error message indicates that a server-locked connection profile is being used, which is the default on OpenVPN Access Server when you download and install the OpenVPN Connect Client. A server-locked connection profile is designed to be user-agnostic, meaning it doesn’t carry any user-identifiable information in it, and is a sort of universal profile. This allows any valid user accounts to start a connection with this OpenVPN Connect Client. The credentials are passed over a secure HTTPS channel to the XML-RPC services of the Access Server for verification, and if approved, the client will receive a copy of the user-locked profile for this user, and a session token. Those will be used to start the OpenVPN tunnel. After the tunnel is disconnected, the user-locked profile and session token are deleted. But for this to work, there must be a working HTTPS connection to the web services of the Access Server.

unable to obtain session ID from vpn.yourserver.com, ports=443:
Other SSL errors:[(‘SSLroutines’,’SSL23_READ’,’ssl handshake failure’)]

This could indicate that the Connect Client was able to reach some service, but it does not appear to be the Access Server web services, or perhaps the traffic is mangled by some firewall or proxy solution. For example we have seen situations where OpenVPN Access Server was installed with default settings, and OpenVPN Connect Client was installed and working, and then the port was changed on the server side from TCP 443, to TCP 444 for example, and then a web server was setup on that same server system, with an HTTPS website running on it on port TCP 443. The OpenVPN Connect Client won’t have received an update to the new port setting for the Access Server web services, and so it tries to talk to the old port, where now a web server runs. This causes an unexpected problem that can result in this type of error. If you encounter this problem you should investigate if the port that the client is trying to reach is actually reachable by this client, and to try to determine if there really is an Access Server web service running there. If you changed the ports on the server you need to reinstall this client so it updates the settings.

unable to obtain session ID from vpn.yourserver.com, ports=443:
ConnectionRefusedError: 10061: No connection could be made because the target machine actively refused it

This is a very clear indication that the address and port that the OpenVPN Connect Client is trying to reach, does not have an Access Server web service running there. For example if you install OpenVPN Connect Client on a client computer, and then you go to the Access Server and change the ports that it listens to, then the client will still be trying to connect to the old ports that were originally configured. This can also sometimes occur if the address of your server is simply misconfigured. The solution is making sure that in the Admin UI in the Network Settings page you have set the address that your server can be reached at correctly (it is best to do a DNS name instead of an IP) and that the ports are how you want them, and then after that’s set up, to download and install the OpenVPN Connect Client on your client computers.

unable to obtain session ID from vpn.yourserver.com, ports=443:
XML-RPC: TimeoutError

This indicates that the Access Server web interface’s XML-RPC interface is unreachable. The OpenVPN Connect Client uses this interface to obtain the necessary certificates and configuration to start the OpenVPN connection when you are using a server-locked profile. You will not be needing the XML-RPC interface when you use user-locked and auto-login profiles. The advantage of server-locked profiles is that they are universal — any valid user at the Access Server can log in and connect. The timeout error just means the connection timed out, usually a firewall or such is blocking the connection. The solution is to ensure that the web interface is reachable from this OpenVPN client, or instead use a user-locked or auto-login type profile.

unable to obtain session ID from vpn.yourserver.com, ports=443:
XML-RPC function GetSession with 1 arguments may not be called at the configured relay level

The OpenVPN Connect Client program for Windows and macOS by default uses server-locked profiles. These contain only the information necessary to talk to the XML-RPC web interface of the Access Server for the purpose of authenticating a user and obtaining the required certificates and connection information to start the OpenVPN tunnel. This is done so this client is universal. It will work for all valid users on the server and isn’t locked to a specific user. This does require that the web interface is reachable and that under client settings in the Admin UI the XML-RPC function is set to at least limited functionality. Full functionality also works, but when you set this to disabled, then you will get this error. The solution is to either stop using server-locked profiles and switch to user-locked or auto-login profiles, or to enable at least limited functionality for XML-RPC calls. The default is limited functionality and that is sufficient for OpenVPN Connect Client and server-locked profiles.

See the logfile ‘C:Program Files (x86)OpenVPN TechnologiesOpenVPN Clientcoreovpntray.exe.log’ for details

If you see this error message while launching the OpenVPN Connect Client, and it fails to launch, you may be missing specific Microsoft Visual C++ Redistributable DLL library files. This issue was resolved in OpenVPN Connect Client for Windows version 2.5.0.136 by adding specific required library files into the OpenVPN Connect Client program directories. You should ensure you use up-to-date software to resolve this issue. You can upgrade your Access Server to the latest version so that it offers updated OpenVPN Connect Client software, or you can separately download the OpenVPN Connect Client for Windows from our website, to upgrade your existing Connect Client version.

Serial number not found in DB

OpenVPN Access Server by default comes with an internal PKI structure, which means a self-signed root certificate with unique certificates generated for each OpenVPN client for that server. These are all unique and tied together. This is part of the strength of OpenVPN, the identity of a VPN client and a VPN server are verified in both directions when a connection is made. The client verifies the server, and the server verifies the client. So for each user account you add to the Access Server, a unique certificate is generated. The certificate is bound to the user account name, so you can’t log in with the credentials for user bob with the certificates for user billy. Each certificate also has a serial number, a unique number identifying the certificate. If you see the error that the serial number is not found in the database, that means this certificate is not known to this server. Even if you revoke a certificate, it is still known to the server, and will not produce this particular error. So you may be using a certificate from a completely different Access Server by mistake, or maybe you started with a new setup of Access Server on your server and the certificates are wiped and new ones generated for the new setup, while you’re still using old certificates from the previous installation. To resolve this problem, make sure to delete the wrong connection profile from your client computer and obtain a new one from your current Access Server installation and use that to connect.

Open TAP device «» PATH=»» FAILED TUN Error: cannot acquire TAP handle EVENT: TUN_IFACE_CREATE cannot acquire TAP handle [FATAL-ERR] 2021 EVENT: DISCONNECTED Client exception in transport_recv: tun_exception: not connected

You may receive this error message when the OpenVPN Connect 3.x service stops or does not resume when you sign back into the computer. The issue is likely caused by an antivirus program. Specifically, we’ve seen this with ESET Antivirus. You can reconnect by restarting the service manually, but the automatic connection may still encounter the issue. To test, turn off ESET. If that resolves the issue, then you may want to open a support ticket with ESET.

See also the topic authentication problems for more possible error messages and solutions regarding authentication issues.

Tweak your settings to secure an unbreakable VPN connection

by Elena Constantinescu

Elena started writing professionally in 2010 and hasn’t stopped exploring the tech world since. With a firm grasp of software reviewing and content editing, she is always trying… read more


Updated on January 18, 2023

Reviewed by
Edgar Nicov

Edgar Nicov

Since the dial-up Internet era, Edgar was interested in online resources. From forums to e-commerce websites, he started digging into how those resources could generate revenue. Today he… read more

  • OpenVPN is one of the most popular VPN protocols, thanks to its superior security and connection speed.
  • You can also use an official OpenVPN client for free.
  • Many users report that OpenVPN is not working on their Windows 10 PCs.
  • If you’re one of them, discover our easy workarounds, like adding an exception to the system firewall.

OpenVPN is an open-source VPN client and VPN protocol with immense popularity, thanks to high security and excellent connection speed.

You can separately download and install the OpenVPN client on all popular devices for free if you want to create a secure tunnel to the web.

Or, you can turn to a commercial VPN provider that adopts OpenVPN.

However, OpenVPN may stop working on Windows 10 computers, due to various issues. If you’re encountering this scenario, here’s what you need to do.

Speaking of scenarios, there are several errors that may appear when you have problems with OpenVPN, many users report issues when attempting to start up the app:

  • OpenVPN GUI not opening
  • Openvpnagent request error in Windows 7, Windows 10 or Windows 11
  • Connecting to the Management interface failed in OpenVPN

Meanwhile, others manage to launch it only to encounter severe disruptions afterward:

  • OpenVPNcrashing in Windows 10 or OpenVPN stopped working all of a sudden
  • OpenVPN connected but not working windows 10
  • DNS not working in Windows 10 with OpenVPN
  • TAP mode is not supported in OpenVPN
  • OpenVPN service is not available
  • Error attempting to connect to the selected server in OpenVPN
  • OpenVPN socket protect error
  • OpenVPN Windows Firewall not working

Below you will find easy-to-follow instructions that should help fix any of the above-mentioned errors and be able to browse the web through a secure OpenVPN tunnel.

How do I enable OpenVPN in Firewall on Windows 10?

In case you have OpenVPN connected but not working in Windows 10, you can enable it by changing a few settings in your firewall security.

Hence, these are the short steps on how to enable OpenVPN in your Firewall:

  1. In the Start Menu, access Firewall settings.
  2. Click on the Advanced Settings.
  3. In the next windows, go to Inbound Rules.
  4. Click on the New rule button.
  5. Select the Program option and Next.
  6. Go to Program’s path and choose OpenVPN.
  7. On the Action window, select Allow the connection.
  8. Let all the three options checked and click Next.
  9. Set the name and description, and then click Finish.

At the same time, this step-by-step guide should resolve OpenVPN not working on Windows 11, so you can use the method on the newest OS version without problems.

How can I fix OpenVPN not working on Windows 10?

1. Add an exception to the firewall

  1. Press the Win key, type firewall, and open Firewall & network protection
  2. Click Allow an app through the firewall
  3. Click Change settings (you need admin rights)
  4. Search for OpenVPN in this list and check its boxes for Private and Public
  5. If it’s not in this list, click Allow another app to browse and select it

It’s possible that your firewall didn’t whitelist OpenVPN when you installed the client. In that case, you have to manually add an exception for it in the system firewall.

If another application is responsible for your computer’s firewall, make sure to adjust the above settings accordingly.

To quickly test this theory, you can temporarily disable the firewall and check if OpenVPN works properly on Windows 10 now.

But don’t forget to turn it back on since you risk exposing your home network to vulnerabilities.

2. Use a reliable VPN client with OpenVPN support

If you’re trying and failing to get the OpenVPN to work on Windows 10, consider getting a commercial VPN app that supports the OpenVPN protocol.

And we can’t think of a better option than Private Internet Access. This software supports multiple protocols, including OpenVPN.

Some PC issues are hard to tackle, especially when it comes to missing or corrupted system files and repositories of your Windows.
Be sure to use a dedicated tool, such as Fortect, which will scan and replace your broken files with their fresh versions from its repository.

This VPN is compatible with all major operating systems and also has a manual configuration option for OpenVPN for those of you who want to add it directly to a supported router.

More about Private Internet Access

  • 35 000+ servers in 80+ countries
  • Split tunneling functionality
  • Private DNS address on each server
  • Zero-logs policy
  • Bypass geo-blocking restrictions from other regions
  • Compatibility with any devices like Windows, macOS, Android, or iOS

Private Internet Access

Utilize this leading VPN software to set up OpenVPN on your Windows device for complete privacy.

3. Whitelist OpenVPN in your antivirus

If your anti-malware application throws errors when you try to use OpenVPN on Windows 10, it could mean that it’s blocking the client or protocol.

However, it’s a false positive. In that case, make sure to add OpenVPN to the whitelist to prevent your antivirus from blocking your VPN.

As in the previous solution, you can quickly test it by temporarily deactivating the real-time detection engine of your anti-malware tool.

But we suggest turning it back on as soon as you finish the test and not leave your computer exposed to malware attacks.

If you’re interested in an anti-malware tool with built-in VPN functionality, check out our best picks.

4. Reset the TAP adapter

uninstall TAP drivers from Device Manager

  1. Right-click the Start button and select Device Manager
  2. Expand the Network adapters menu
  3. Look for any TAP drivers, right-click and select Uninstall device
  4. Open the Action menu and select Scan for hardware changes

The OpenVPN client requires a TAP driver to work properly. If its functionality is broken, it could be the reason why OpenVPN is not working on your Windows 10 PC.

However, you can easily fix this by uninstalling the TAP driver from Device Manager – it should get automatically reinstalled.

As a general rule, it’s essential to keep Windows drivers updated to the latest version.

Read more about this topic

  • Microsoft Purview might be too intrusive, IT admins agree
  • iCUE is not working after an update? Fix it in 3 steps
  • What is Makecab.exe & How to Fix its High CPU Usage
  • AADSTS51004 error on Teams: how to fix it
  • What is Cscript.exe & What is It Used for?

5. Check if the DHCP service is running

DHCP Client Service Set Automatic

  1. Press the Win key, type services, and open Services
  2. Right-click DHCP Client and select Properties
  3. Set Startup type to Automatic
  4. Click OK

Many OpenVPN users report seeing the Initialization Sequence Completed with errors message on Windows 10.

It signals a problem with the DHCP client, which you can restart using the instructions above.

6. Flush DNS and reset Winsock

flush DNS servers in Windows 10

  1. Run Command Prompt as admin: press Ctrl + R, type cmd, hold Ctrl + Shift, and press Enter
  2. Copy and paste the next lines (press Enter between each line)
ipconfig /flushdns

ipconfig /registerdns

ipconfig /release

ipconfig /renew

NETSH winsock reset catalog

NETSH int ipv4 reset reset.log

NETSH int ipv6 reset reset.log

exit

Restart your PC to apply the new changes.

The DNS cache and Winsock configuration are responsible for your computer connectivity.

If they’re not initialized properly, it could be the reason why OpenVPN isn’t working on Windows 10.

To recap, if your OpenVPN configuration fails to work on Windows 10, you can fix this issue by adding an exception to the firewall and whitelisting OpenVPN in your antivirus.

You can also reset the TAP adapter, check if the DHCP service is running, as well as flush your DNS and reset Winsock.

But we suggest opting for a trustworthy VPN like Private Internet Access It has built-in support for the OpenVPN protocol, which means that you shouldn’t see any errors anymore.

Learn everything about OpenVPN to master this VPN protocol and client. Also, visit our VPN Troubleshooting Hub whenever you need a VPN quick fix.

Still experiencing issues?

SPONSORED

If the above suggestions have not solved your problem, your computer may experience more severe Windows troubles. We suggest choosing an all-in-one solution like Fortect to fix problems efficiently. After installation, just click the View&Fix button and then press Start Repair.

newsletter icon

Иногда случаются проблемы с VPN подключением или VPN не работает. На данной странице вы можете найти описание возникающей ошибки впн и самостоятельно исправить ее.

Вы везунчик!

Поздравляем! Вы нашли скрытый промо-код со скидкой 75% на покупку анонимного VPN без логов.
Промо-код действует только 1 час.

Купить VPN

Ошибки OpenVPN

Если вы не знаете как узнать ошибку, возникшую в ходе подключения, нажмите на следующую ссылку:

  • Как узнать какая OpenVPN ошибка возникла?

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

  • Не могу выбрать «Connect» при нажатии на иконку в системном трее?
  • Connect to IP:Port failed, will try again in 5 seconds; No Route to Host
  • Cannot load certificate file client.crt
  • All TAP-Win32 adapters on this system are currently in use
  • ERROR: Windows route add command failed: returned error code 1?
  • Initialization Sequence Completed With Errors

Как узнать какая OpenVPN ошибка возникла?

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

Зеленый значок в системном трее

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

Успешное подключение к OpenVPN серверу

наверх

Не могу выбрать «Connect» при нажатии на иконку в системном трее

В списке есть только «Proxy Settings», «About» и «Exit», но нет пункта «Connect».

Отсутствует кнопка Connect у клиента OpenVPN

Это означает, что вы не скачали и/или не скопировали конфигурационный файл «client.ovpn» в «C:/Program Files/OpenVPN/config». Откройте еще раз Инструкцию по настройке OpenVPN соединения для вашей ОС и проверьте все шаги установки и настройки.

наверх

Connect to IP:Port failed, will try again in 5 seconds; No Route to Host

Данная ошибка означает, что у вас нет подключения к Интернету, либо его блокирует ваш Firewall или Антивирус.

Ошибка OpenVPN - нет связи с Интернетом

Проверьте активно ли ваше Интернет подключение, отключите Firewall, Антивирус и подключитесь еще раз.

наверх

Cannot load certificate file client.crt

Данная ошибка связана с отсутствием сертификационных файлов в папке «C:Program FilesOpenVPNconfig».

Ошибка OpenVPN - нет сертификатов

В процессе установки было необходимо скачать архив с сертификатами и распаковать его в папку с программой. Откройте еще раз Инструкцию по настройке OpenVPN соединения для вашей ОС и проверьте все шаги установки и настройки.

наверх

All TAP-Win32 adapters on this system are currently in use

Эта впн ошибка связана с некорректной работой Windows и программы OpenVPN. Также эта OpenVPN ошибка может возникнуть вследствие отключения Интернета без отключения сначала OpenVPN соединения. Всегда отключайте сначала OpenVPN соединение и только затем Интернет.

Ошибка OpenVPN - нет свободных виртуальных адаптеров

Для устранения ошибки, зайдите в «Пуск -> Сетевые подключения». Найдите «Подключение по локальной сети. TAP-Win32 Adapter» и правой кнопкой мышки щелкните на ярлыке. Выберите «Отключить».

Отключение виртуального адаптера для устранения ошибки OpenVPN

Затем, таким же образом, «Включите» данное подключение. После выполнения данных действий проблемы с VPN подключением должны исчезнуть.

Включение виртуального адаптера для устранения ошибки OpenVPN

наверх

ERROR: Windows route add command failed: returned error code 1

Данная ошибка связана с ограничением прав в Windows Vista, Seven.

Ошибка OpenVPN - проблема в Windows Vista, Seven

Для устранения ошибки, необходимо выйти из OpenVPN GUI. Правой кнопкой мышки нажать на иконку OpenVPN GUI на рабочем столе и выбрать пункт меню «Свойства»

Свойства программы OpenVPN

На вкладке «Совместимость» поставьте галочку «Выполнять эту программу от имени администратора».

Выполнять программу OpenVPN от имени администратора

Теперь запустите OpenVPN GUI еще раз и подключитесь к VPN серверу.

наверх

Initialization Sequence Completed With Errors

Данная ошибка связана с неправильной работой службы DHCP из-за антивирусов или фаерволов.

Ошибка наблюдалась постоянно у фаервола Outpost Firewall версии 2009 и ранее, наблюдается также у антивируса Касперского. Ниже представлено решение для антивируса Касперского. Сам алгоритм ничем не отличается от решения проблемы для других антивирусов и фаерволов.

Ошибка OpenVPN связанная с антивирусом

Для устранения ошибки, необходимо зайти в «Пуск -> Панель Управления -> Сетевые подключения» и зайти в «Свойства» виртуального адаптера «TAP-Win 32 Adapter». На вкладке «Общие» в списке отключить Kaspersky Anti-Virus NDIS Filter и затем нажать «ОК».

Отключение Антивируса Касперского в свойствах виртуального адаптера

Теперь подключитесь к VPN и подключение должно пройти успешно.

наверх

Содержание

  1. Настройка OpenVPN для Windows
  2. Содержание
  3. Установка OpenVPN GUI
  4. Настройка OpenVPN GUI
  5. Подключение в VPN-серверу
  6. Не подключается OpenVPN
  7. 1. Сервис запущен?
  8. 2. Открыт порт?
  9. 3. Соответствуют ли настройки?
  10. 4. Используете ли правильные ключи?
  11. 5. Стабильная сеть?
  12. 6. Проанализируйте лог файл
  13. 7. Два пользователя одновременно
  14. 8. Истек срок действия crl
  15. 9. Сервер перегружен
  16. Выводы
  17. Ошибки VPN
  18. Вы везунчик!
  19. Ошибки OpenVPN
  20. Как узнать какая OpenVPN ошибка возникла?
  21. Не могу выбрать «Connect» при нажатии на иконку в системном трее
  22. Connect to IP:Port failed, will try again in 5 seconds; No Route to Host
  23. Cannot load certificate file client.crt
  24. All TAP-Win32 adapters on this system are currently in use
  25. ERROR: Windows route add command failed: returned error code 1
  26. Initialization Sequence Completed With Errors
  27. Настройка OpenVPN. Подключение к бесплатным серверам VPN Gate
  28. Настройка OpenVPN для Windows
  29. Настройка OpenVPN для MacOS
  30. Как настроить сервер OpenVPN на Windows
  31. Установка OpenVPN Server
  32. Создание сертификатов
  33. а) Создание сертификатов с RSA 3
  34. б) Создание сертификатов с RSA 2
  35. Настройка сервера
  36. Настройка клиента
  37. На сервере
  38. На клиенте
  39. Доступ к локальной сети
  40. 1. Настройка реестра
  41. 2. Настройка OpenVPN Server
  42. 3. Разрешаем доступ к локальной сети
  43. Возможные проблемы

Настройка OpenVPN для Windows

Пошаговая инструкция по настройке OpenVPN GUI в Windows 10. The OpenVPN GUI это бесплатная программа с открытым кодом, доступная для всех версий Windows.

Содержание

Установка OpenVPN GUI

Или скачайте установочный файл для вашей версии Windows по следующим ссылкам:

YpRwRAASe

Установщик запущен. Нажмите Next для начала установки!

LQSuDdvEp

W99Qw1shD

nfXdpX Yt

RgDP2D5IB

Qs5wqP0tO

V74R5biuJ

2EB9mgcYB

Настройка OpenVPN GUI

В процессе установки, ярлык OpenVPN GUI будет добавлен на рабочий стол Windows. Нажмите правой кнопкой мыши по нему OpenVPN GUI и выберите в меню пункт «Открыть разположение файла».

TA4ab1pG6

sE7EARpSJ

rAqA8fU4k

После этого вы увидите предупреждение «Destination Folder Access Denied». Windows попросит вас предоставить права администратора для перемещения файла. Согласитесь.

Отлично! Ваш конфигурационный файл SnowdenVPN.ovpn находится в C:Program FilesOpenVPNconfig и теперь вы можете подключиться к серверу.

Подключение в VPN-серверу

Дважды нажмите мышью на ярлык OpenVPN GUI на рабочем столе.

uilLrF0Hv

Когда OpenVPN GUI запустится, на панеле уведомлений появится его значок.

Нажмите правой кнопкой мыши по значку OpenVPN GUI на панеле уведомлений.

В выпадающем меню выбирите пункт Подключиться.

1I6JFDqHX

После этого появится окно подключения.

Когда OpenVPN GUI подключится в серверу, значок станет зеленого цвета.

Источник

Не подключается OpenVPN

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

1. Сервис запущен?

Если вы только что установили и настроили OpenVPN, убедитесь, что его сервис запущен и работает. Если сервер не запущен, то, как правило, при попытке подключения вы будете получать ошибку «Connection refused». Для проверки выполните:

sudo systemctl status openvpn

В некоторых случаях сервис запускается с определённым конфигом. Тогда для проверки нужно указать этот конфигурационный файл:

sudo systemctl status openvpn@имя_конфига

Snimok ekrana ot 2019 02 11 15 46 10

Также вы можете посмотреть, слушает ли сервис подключения на порту OpenVPN:

Snimok ekrana ot 2019 02 11 15 27 20

2. Открыт порт?

Если сервис запущен и слушает подключения на 1194 порту, а вы всё ещё не можете подключится, убедитесь, что этот порт не защищён брандмауэром на сервере. Для этого просто пробуем подключится к нему с помощью telnet:

telnet ip_сервера 1194

Когда всё хорошо, утилита сообщит об успешном подключении:

Snimok ekrana ot 2019 02 11 16 37 50

sudo ufw allow 1194

Теперь можете снова попробовать подключаться к вашему OpenVPN-серверу и теперь всё должно заработать.

3. Соответствуют ли настройки?

4. Используете ли правильные ключи?

Если вы подписывали ключи вручную, без использования какого-либо автоматического скрипта настройки OpenVPN, и поэтому они находятся в отдельных файлах от клиентского конфигурационного файла, тогда проверьте, используете ли вы правильные ключи и правильно ли они подписаны. Обычно при проблемах с ключами всё это очень хорошо видно в лог-файле OpenVPN. Но об этом позже. Попробуйте подписать ключи ещё раз.

5. Стабильная сеть?

Если OpenVPN подключается, но подключение постоянно разрывается, причиной этому может стать нестабильная сеть. Если вы знаете, что сеть у вас не очень стабильная или сильно загружена, уберите эти опции из конфигурационного файла клиента:

sudo vi /etc/openvpn/server.conf

#ping 5
#ping-restart 10

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

6. Проанализируйте лог файл

Если вам всё ещё не удалось выяснить, почему не работает подключение, значит это что-то более серьёзное и без анализа лог-файла вам не обойтись. При подключении в терминале клиента вы обычно будете получать примерно одну и ту же ошибку:

SIGUSR1[soft,connection-reset] received, process restarting

Snimok ekrana ot 2019 02 11 16 15 30

Более подробную информацию можно взять из лог-файла сервера. Лог-файл настраивается директивой log-append в конфигурационном файле сервера, обычно это /var/log/openvpn.log.

По умолчанию уровень логирования равен трём. На этом уровне вы мало что сможете понять. Вам нужен уровень 9, максимальный. Поэтому откройте конфигурационный файл и приведите настройки логирования к такому виду:

log-append /var/log/openvpn.log
verb 9

Теперь перезапустите OpenVPN:

sudo systemctl restart openvpn@имя_конфига

Откройте лог-файл и попробуйте снова подключится:

Здесь вы увидите очень много информации, просмотрите её внимательно и найдите, где именно находится проблема. Обычно программа сама говорит где проблема и как её решить. Главное, потом не забудьте вернуть значение параметра verb по умолчанию (3) иначе лог-файл очень быстро займёт всё свободное место на жёстком диске.

7. Два пользователя одновременно

Если по одному и тому же конфигурационному файлу пытаются подключится два или больше пользователей одновременно, то OpenVPN примет только одно подключение, а все остальные будет сбрасывать. Это поведение можно изменить, добавив к конфигурации сервера строчку:

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

8. Истек срок действия crl

Затем скопируйте полученный файл в папку с файлами OpenVPN:

cp /etc/openvpn/easy-rsa/pki/crl.pem /etc/openvpn/crl.pem

Готово, теперь у вас всё будет работать.

9. Сервер перегружен

Если вы не можете подключится или подключение разрывается, причиной этому может стать недостаточное количество ресурсов на сервере. Убедитесь, что сервер ничем не перегружен, а на жёстком диске есть свободное место.

Выводы

Сегодня мы разобрали несколько причин, почему может возникнуть ошибка «не удалось подключиться к OpenVPN». Конечно, это только самые простые проблемы, и при более серьёзном использовании программы можно столкнутся с более крупными проблемами. Какие казусы с подключением к OpenVPN вам приходилось решать? Напишите свои варианты решений в комментариях!

Источник

Ошибки VPN

Иногда случаются проблемы с VPN подключением или VPN не работает. На данной странице вы можете найти описание возникающей ошибки впн и самостоятельно исправить ее.

Вы везунчик!

Поздравляем! Вы нашли скрытый промо-код со скидкой 75% на покупку анонимного VPN без логов.
Промо-код действует только 1 час.

Ошибки OpenVPN

Если вы не знаете как узнать ошибку, возникшую в ходе подключения, нажмите на следующую ссылку:

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

Как узнать какая OpenVPN ошибка возникла?

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

ovpnwinmobile 4

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

mistakes ovpn ru 1

Не могу выбрать «Connect» при нажатии на иконку в системном трее

В списке есть только «Proxy Settings», «About» и «Exit», но нет пункта «Connect».

mistakes ovpn ru 5

Это означает, что вы не скачали и/или не скопировали конфигурационный файл «client.ovpn» в «C:/Program Files/OpenVPN/config». Откройте еще раз Инструкцию по настройке OpenVPN соединения для вашей ОС и проверьте все шаги установки и настройки.

Connect to IP:Port failed, will try again in 5 seconds; No Route to Host

Данная ошибка означает, что у вас нет подключения к Интернету, либо его блокирует ваш Firewall или Антивирус.

mistakes ovpn ru 2

Проверьте активно ли ваше Интернет подключение, отключите Firewall, Антивирус и подключитесь еще раз.

Cannot load certificate file client.crt

Данная ошибка связана с отсутствием сертификационных файлов в папке «C:Program FilesOpenVPNconfig».

mistakes ovpn ru 6

В процессе установки было необходимо скачать архив с сертификатами и распаковать его в папку с программой. Откройте еще раз Инструкцию по настройке OpenVPN соединения для вашей ОС и проверьте все шаги установки и настройки.

All TAP-Win32 adapters on this system are currently in use

Эта впн ошибка связана с некорректной работой Windows и программы OpenVPN. Также эта OpenVPN ошибка может возникнуть вследствие отключения Интернета без отключения сначала OpenVPN соединения. Всегда отключайте сначала OpenVPN соединение и только затем Интернет.

mistakes ovpn ru 3

mistakes ovpn ru 3b

Затем, таким же образом, «Включите» данное подключение. После выполнения данных действий проблемы с VPN подключением должны исчезнуть.

mistakes ovpn ru 3c

ERROR: Windows route add command failed: returned error code 1

Данная ошибка связана с ограничением прав в Windows Vista, Seven.

mistakes ovpn ru 4

Для устранения ошибки, необходимо выйти из OpenVPN GUI. Правой кнопкой мышки нажать на иконку OpenVPN GUI на рабочем столе и выбрать пункт меню «Свойства»

ovpnwinvista en 12

На вкладке «Совместимость» поставьте галочку «Выполнять эту программу от имени администратора».

ovpnwinvista en 13

Теперь запустите OpenVPN GUI еще раз и подключитесь к VPN серверу.

Initialization Sequence Completed With Errors

Данная ошибка связана с неправильной работой службы DHCP из-за антивирусов или фаерволов.

Ошибка наблюдалась постоянно у фаервола Outpost Firewall версии 2009 и ранее, наблюдается также у антивируса Касперского. Ниже представлено решение для антивируса Касперского. Сам алгоритм ничем не отличается от решения проблемы для других антивирусов и фаерволов.

mistakes ovpn ru 7

mistakes ovpn ru 7b

Теперь подключитесь к VPN и подключение должно пройти успешно.

Источник

Настройка OpenVPN. Подключение к бесплатным серверам VPN Gate

Настройка OpenVPN для Windows

Данная инструкция демонстрирует, как подключиться к серверу ретрансляции VPN Gate, используя клиент OpenVPN в системах Windows XP, 7, 8, 10, Server 2003, 2008, 2012.

1. Установите клиентское приложение OpenVPN для вашей операционной системы. Запустите установочный файл. Откроется мастер установки. Следуйте подсказкам на экране, чтобы выполнить установку приложения.

OpenVPN windows 1

2. Скачайте и загрузите файл конфигурации подключения OpenVPN (файл. ovpn). Данная процедура требуется только при первичной настройке подключения.

Файл конфигурации формата *.ovpn понадобиться для подключения к серверу ретрансляции VPN Gate через протокол OpenVPN.

Загрузить файл конфигурации (OpenVPN Config file) можно на странице списка открытых бесплатных серверов ретрансляции http://www.vpngate.net/en/. Выберите VPN-сервер, к которому вы хотите подключиться и нажмите на соответствующий файл *.ovpn, чтобы скачать его на рабочий стол или папку загрузки.

OpenVPN windows 2

После сохранения файла на компьютере, он будет отображаться как иконка OpenVPN. Тем не менее, вы не сможете установить подключение, просто дважды кликнув по файлу.

Нужно переместить файл *.ovpn в папку “config” основной директории установки OpenVPN.

Откройте папку C:Program FilesOpenVPNconfig и скопируйте файл *.ovpn в нее.

OpenVPN windows 3

3. Подключение к VPN

Кликните правой кнопкой мыши по иконке “OpenVPN GUI” на рабочем столе и выберите опция “Запустить от имени администратора”. В противном случае, установить VPN подключение не удастся.

2017 05 24 0925

Иконка OpenVPN GUI появится в области уведомления панели задач (системном трее). В некоторых случаях иконка может быть скрытой, нажмите по значку стрелки, чтобы показать все скрытые иконки.

Щелкните правой кнопкой мыши по иконке OpenVPN GUI и нажмите “Подключить”.

OpenVPN windows 6

Запуститься VPN подключение. Статус подключения будет отображаться на экране. Если вы увидите диалоговое окно запроса имени пользователя и пароля. Введите “vpn” в оба поля. Данное окно появляется очень редко.

2017 05 24 0918

Если VPN подключение успешно установлено, то появится всплывающее сообщение как на скриншоте.

OpenVPN windows 7

4. Интернет без ограничений

Когда подключение VPN установлено, в системе Windows создается виртуальный сетевой адаптер TAP-Windows Adapter V9. Этот адаптер получит IP-адрес, который начинается с “10.211”. Виртуальный адаптер получит адрес шлюза по умолчанию.

2017 05 24 0913

Вы сможете проверить конфигурацию сети, запустив команду ipconfig /all в командной строке Windows.

OpenVPN windows 8

Когда соединение установлено, весь сетевой трафик будет проходить проходить через VPN-сервер. Убедиться в этом вы сможете с помощью команды tracert 8.8.8.8 в командной строке Windows.

OpenVPN windows 9

Как показано на скриншоте выше, если пакеты проходят через «10.211.254.254», значит ваше подключение ретранслируется через один из серверов VPN Gate. Вы также можете перейти на основную страницу VPN Gate, чтобы посмотреть глобальный IP-адрес.

2017 05 24 0909

Вы сможете увидеть видимое из сети местоположение, которое будет отличаться от вашей фактической локации.

2017 05 24 0922

Настройка OpenVPN для MacOS

Данная инструкция демонстрирует, как подключиться к серверу ретрансляции VPN Gate, используя приложение Tunnelblick. Tunnelblick является версий клиента OpenVPN с графической оболочкой. для систем MacOS.

1. Установите приложение Tunnelblick

Скачайте и установите последнюю версию приложения Tunnelblick. Во время установки на экране будут показываться инструкции.

openvpn mac 1

После завершения установки появится следующий экран. Выберите опцию “У меня есть файлы конфигурации”.

openvpn mac 2

На экране будет показана инструкция по добавлению конфигурации в Tunnelblick.

openvpn mac 3

Нажмите ОК, чтобы закрыть окно.

Файл конфигурации формата *.ovpn понадобиться для подключения к серверу ретрансляции VPN Gate через протокол OpenVPN.

Скачать файл конфигурации (OpenVPN Config file) можно на странице списка открытых бесплатных серверов ретрансляции http://www.vpngate.net/en/. Выберите VPN-сервер, к которому вы хотите подключиться и нажмите на соответствующий файл *.ovpn, чтобы его загрузить в папку загрузок (Downloads).

openvpn mac 8

openvpn mac 4

Во время добавления нужно будет ввести имя пользователя и пароль от учетной записи MacOS.

3. Подключение к VPN

Нажмите по иконке Tunnelblick на верхней панели инструментов MacOS и выберите опцию “Соединить [название конфигурации]”. Будет запущено подключение к VPN.

openvpn mac 6

Появится статус подключения к VPN, как показано на скриншоте. После успешной установки подключения, в основном окне Tunnelblick будет показываться состояние “Соединен”.

openvpn mac 7

4. Интернет без ограничений

Когда соединение установлено, весь сетевой трафик будет проходить проходить через VPN-сервер. Вы также можете перейти на основную страницу VPN Gate, чтобы посмотреть глобальный IP-адрес. Вы сможете увидеть видимое из сети местоположение, которое будет отличаться от вашей фактической локации.

При подключении к VPN вы сможете посещать заблокированные веб-сайты и играть в заблокированные игры.

Источник

Как настроить сервер OpenVPN на Windows

OpenVPN позволяет настроить VPN-сервер как на платформе Windows Server, так и версии для рабочего компьютера (Windows 10, 8, 7).

Установка OpenVPN Server

Переходим на официальный сайт OpenVPN и скачиваем последнюю версию программы для соответствующей версии Windows:

openvpn server windows 01

openvpn server windows 02

* интерфейсы для старой версии OpenVPN и новой немного различаются. Нам нужно выбрать для установки все пункты.

. снова Next и Install — начнется установка. В процессе мастер может выдать запрос на подтверждение установки виртуального сетевого адаптера — соглашаемся (Install/Установить).

Создание сертификатов

Новая версия OpenVPN позволяет создавать сертификаты на основе Easy RSA 3, старая работает на базе 2-й версии. Наши действия будут различаться в зависимости от данной версии. Рассмотрим процесс формирования сертификата с использованием как RSA3, так и RSA2.

а) Создание сертификатов с RSA 3

1. Переходим в папку установки OpenVPN (по умолчанию, C:Program FilesOpenVPN) и создаем каталог ssl.

2. После переходим в папку C:Program FilesOpenVPNeasy-rsa, переименовываем файл vars.bat.example в vars.bat, открываем его на редактирование и правим одну строку:

set_var EASYRSA_TEMP_DIR «$EASYRSA_PKI/temp»

* мы снимаем комментарий и добавляем temp в конце $EASYRSA_PKI. Если это не сделать, то при попытке сформировать корневого сертификата мы получим ошибку Failed create CA private key.

3. Запускаем командную строку от имени администратора:

openvpn server windows 03

4. Переходим в каталог easy-rsa:

5. Запускаем команду:

Мы окажемся в среде EasyRSA Shell.

6. Инициализируем PKI:

init-pki complete; you may now create a CA or requests.
Your newly created PKI dir is: C:/Program Files/OpenVPN/easy-rsa/pki

7. Генерируем корневой сертификат (CA):

. после ввода Enter обязательно задаем пароль дважды. На запрос ввести Common Name можно просто нажать ввод или написать свое имя:

Common Name (eg: your user, host, or server name) [Easy-RSA CA]:

8. Создаем ключ Диффи-Хеллмана:

9. Для создания сертификата сервера необходимо сначала создать файл запроса:

./easyrsa gen-req cert nopass

* на запрос ввода Common Name просто вводим Enter.

. и на его основе — сам сертификат:

./easyrsa sign-req server cert

После ввода команды подтверждаем правильность данных, введя yes:

Confirm request details: yes

. и вводим пароль, который указывали при создании корневого сертификата.

10. Для создания ta ключа используем команду:

11. Сертификаты сервера готовы и находятся в каталоге pki. Переносим в C:Program FilesOpenVPNssl следующие файлы:

б) Создание сертификатов с RSA 2

1. Переходим в папку установки OpenVPN (по умолчанию, C:Program FilesOpenVPN) и создаем каталог ssl.

2. После переходим в папку C:Program FilesOpenVPNeasy-rsa, создаем файл vars.bat, открываем его на редактирование и приводим к следующему виду:

set «PATH=%PATH%;%ProgramFiles%OpenVPNbin»
set HOME=%ProgramFiles%OpenVPNeasy-rsa
set KEY_CONFIG=openssl-1.0.0.cnf
set KEY_DIR=keys
set KEY_SIZE=2048
set KEY_COUNTRY=RU
set KEY_PROVINCE=Sankt-Petersburg
set KEY_CITY=Sankt-Petersburg
set KEY_ORG=Organization
set KEY_EMAIL=master@dmosk.ru
set KEY_CN=DMOSK
set KEY_OU=DMOSK
set KEY_NAME=server.domain.ru
set PKCS11_MODULE_PATH=DMOSK
set PKCS11_PIN=12345678

* в каталоге easy-rsa уже есть файл vars.bat.sample — можно переименовать и использовать его.
** значение HOME не меняем, если оставили путь установки программы по умолчанию; KEY_DIR — каталог, куда будут генерироваться сертификаты; KEY_CONFIG может быть разным — его лучше посмотреть в файле vars.bat.sample или по названию соответствующего файла в папке easy-rsa; KEY_NAME желательно, чтобы соответствовал полному имени VPN-сервера; остальные опции можно заполнить произвольно.

3. Запускаем командную строку от имени администратора:

openvpn server windows 03

4. Переходим в каталог easy-rsa:

4. Запускаем vars.bat:

5. Чистим каталоги от устаревшей информации:

* данная команда выполняется один раз, когда на сервере нет информации по ранее созданным сертификатам.

6. Снова запускаем vars.bat (после clean переопределяются некоторые переменные):

Переходим к созданию ключей.

7. Генерируем последовательность центра сертификации:

На все запросы нажимаем Enter.

8. Запускаем build-dh.bat (сертификат с использованием алгоритма Диффи-Хеллмана):

* команда может выполняться долго — это нормально.

9. Генерируем сертификат для сервера:

* где cert — имя сертификата; на все запросы нажимаем Enter. В конце подтверждаем два раза корректность информации вводом y.

10. После переносим из папки C:Program FilesOpenVPNeasy-rsakeys в C:Program FilesOpenVPNssl следующие файлы:

Настройка сервера

Переходим в папку C:Program FilesOpenVPNconfig-auto (или для старой версии C:Program FilesOpenVPNconfig) и создаем файл server.ovpn. Открываем его на редактирование и приводим к следующему виду:

port 443
proto udp
dev tun
dev-node «VPN Server»
dh «C:\Program Files\OpenVPN\ssl\dh.pem»
ca «C:\Program Files\OpenVPN\ssl\ca.crt»
cert «C:\Program Files\OpenVPN\ssl\cert.crt»
key «C:\Program Files\OpenVPN\ssl\cert.key»
server 172.16.10.0 255.255.255.0
max-clients 32
keepalive 10 120
client-to-client
compress
ncp-disable
fast-io
cipher AES-256-CBC
persist-key
persist-tun
status «C:\Program Files\OpenVPN\log\status.log»
log «C:\Program Files\OpenVPN\log\openvpn.log»
verb 4
mute 20

openvpn server windows 04

Теперь открываем службы Windows и находим «OpenVpnService». Открываем ее, настраиваем на автозапуск и включаем:

openvpn server windows 05

Ранее переименованный сетевой интерфейс должен включиться:

openvpn server windows 06

Настройка клиента

На сервере

На сервере генерируем сертификат для клиента. Для этого сначала чистим файл index.txt в папке C:Program FilesOpenVPNeasy-rsakeys.

Затем запускаем командную строку от имени администратора:

openvpn server windows 03

Переходим в каталог easy-rsa:

Далее наши действия зависят от версии RSA.

а) Создание сертификатов с RSA 3

Мы окажемся в среде EasyRSA Shell.

Создаем клиентский сертификат:

./easyrsa gen-req client1 nopass

./easyrsa sign-req client client1

Мы должны увидеть запрос на подтверждение намерения выпустить сертификат — вводим yes:

Confirm request details: yes

* в данном примере будет создан сертификат для client1.

После вводим пароль, который указывали при создании корневого сертификата.

Теперь из папки pki копируем файлы:

. и переносим их на клиентский компьютер.

б) Создание сертификатов с RSA 2

И генерируем сертификат первого пользователя:

* на все запросы наживаем Enter, кроме Common Name — в данном поле вводим имя клиента (в нашем случае, просто client1). В конце подтверждаем введенную информацию — y.
** На каждого клиента нужно сгенерировать свой сертификат, в противном случае, им будет присваиваться один и тот же IP-адрес, что будет приводить к конфликту.

Получиться, что-то на подобие:

Country Name (2 letter code) [RU]:
State or Province Name (full name) [Sankt-Petersburg]:
Locality Name (eg, city) [Sankt-Petersburg]:
Organization Name (eg, company) [Organization]:
Organizational Unit Name (eg, section) [DMOSK]:
Common Name (eg, your name or your server’s hostname) [DMOSK]:client1
Name [server.domain.ru]:
Email Address [master@dmosk.ru]:

По умолчанию, для Common Name будет подставляться значение из vars.bat — но с ним сертификат не будет создаваться. Необходимо при создании каждого ключа подставлять значение, равное имени сертификата. Например, как выше — подставлено client1.

Теперь из папки keys копируем файлы:

. и переносим их на клиентский компьютер.

На клиенте

Заходим на официальную страницу загрузки openvpn и скачиваем клиента для Windows:

openvpn server windows 01

* по сути, это тот же файл, который скачивался для сервера.

Запускаем скачанный файл и устанавливаем программу, нажимая «Далее».

Переходим в папку C:Program FilesOpenVPNconfig. И копируем в нее сертификаты, которые перенесли с сервера.

Теперь открываем блокнот от имени администратора и вставляем следующие строки:

client
resolv-retry infinite
nobind
remote 192.168.0.15 443
proto udp
dev tun
compress
ncp-disable
fast-io
cipher AES-256-CBC
ca ca.crt
cert client1.crt
key client1.key
dh dh.pem
float
keepalive 10 120
persist-key
persist-tun
verb 0

Сохраняем файл с именем config.ovpn в папке C:Program FilesOpenVPNconfig.

Запускаем с рабочего стола программу «OpenVPN GUI» от имени администратора (это важно).

Нажимаем правой кнопкой по появившемуся в трее значку и выбираем «Подключиться»:

openvpn connect

Произойдет подключение и значок поменяет цвет с серого/желтого на зеленый.

Доступ к локальной сети

По инструкции выше мы сможем получить доступ только к серверу, на котором установлен OpenVPN. Для получения доступа ко всей внутренней сети, выполним следующие шаги.

1. Настройка реестра

Для включения IP маршрутизации в Windows необходимо в ветке реестра HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters найти параметр IPEnableRouter и задать ему значение 1. Это можно сделать в утилите редактирования реестра (regedit) или командой:

reg add «HKLMSYSTEMCurrentControlSetServicesTcpipParameters» /v IPEnableRouter /t REG_DWORD /d 1 /f

* командную строку необходимо запускать от администратора.

2. Настройка OpenVPN Server

В конфигурационный файл OpenVPN добавим:

push «route 172.16.10.0 255.255.255.0»
push «route 192.168.2.0 255.255.255.0»

* где 172.16.10.0 — VPN сеть; 192.168.2.0 — локальная сеть, в которую необходимо «попасть» пользователям openvpn.

При необходимости использовать DNS внутренней сети также добавим:

push «dhcp-option DNS 192.168.0.15»
push «dhcp-option DNS 192.168.0.16»
push «dhcp-option DOMAIN dmosk.local»

* где 192.168.0.15 и 192.168.0.16 — внутренние DNS-серверы; dmosk.local — домен, который будет добавляться к узлам, обращение к которым идет по неполному имени.

Если нам нужно, чтобы все запросы клиента (в том числе, Интернет) ходили через сервер OpenVPN, добавляем:

push «redirect-gateway def1»

* в таком случае, нам не обязательно добавлять push route, который мы использовали выше.

Перезагружаем службу OpenVpnService.

3. Разрешаем доступ к локальной сети

openvpn server windows 07

На вкладке Доступ ставим галочку Разрешить другим пользователям сети использовать подключение к Интернету данного компьютера:

openvpn server windows 08

. и сохраняем настройки.

Возможные проблемы

Большая часть проблем решается при помощи логов, которые находятся в папке C:Program FilesOpenVPNlog. Уровень детализации лога контролируется параметром verb в конфигурационном файле сервера или клиента.

Также возможны следующие часто возникающие проблемы:

Источник

Возможно, вам также будет интересно:

  • Openvpn ошибка all tap windows adapters on this system are currently in use
  • Openvpn выдает ошибку при подключении
  • Openvpn terminated with exit code 1 как устранить ошибку
  • Openvpn gui ошибка создания ключа
  • Openvpn gui ошибка подключения

  • Понравилась статья? Поделить с друзьями:
    0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии