Openvpn client windows 2012

  • Windows
  • MacOS
  • Linux
  • Android
  • iOS
  • ChromeOS

Connect to any compatible server

Connect to Access Server, CloudConnexa or any OpenVPN protocol-compatible server or service.

Superior Authentication

Supports 2FA and SAML authentication. Authenticate prior to profile download and connection.

Instant Connection

Easily import connection configuration by just opening a URL.

Frequently asked questions

How do I connect to OpenVPN?

In order to connect to the VPN server or service, you need to obtain a file that contains the specifics needed for the connection. Such a configuration file is called a profile and has an .ovpn file extension.

If your business is using Access Server or CloudConnexa and your IT department has provided you a URL, you can directly import the profile by entering the URL.

However, if you have received the profile as a file from your IT department or from some other OpenVPN compatible service, you can import the profile by selecting the file.

How do I connect if the OpenVPN client is integrated into my router?

In order to connect to the VPN server or service, you need to obtain a file that contains the specifics needed for the connection. Such a configuration file is called a profile and has an .ovpn file extension.

After receiving the .ovpn file from you IT department, you need to follow instructions specific to the router to extract specific information from the file and use it for configuration. We have made guides for some of the common firmware used in hardware routers and for pfSense:

pfSense

OpenWrt

DD-WRT

Ниже мы детально разберем все, что касается серверных настроек на Win Server2008 и Server2012, а также покажем, как сделать подключения юзеров к созданной сети.

OpenVPN – это представление открытой (от англ. «open» — «открыть») частной виртуальной сети (от англ. «Virtual Private Network»). Данная технология помогает создавать виртуальные подключения групп клиентов к расположенных на расстоянии машинам посредством передачи данных по открытому каналу, то есть интернету.

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

Принципы работы

OpenVPN

Произведенная настройка позволит серверу взаимодействовать с внешним защищенным шифрованием SSL и создавать безопасное подключение к виртуальной сетевой машине (tun/tap). При этом не нужно будет волноваться об обработке трафика, поступающего от внешнего адаптера и аналогичных интерфейсов. Для серверных машин можно будет создать общий доступ к одному из указанных серверных адаптеров.

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

OpenVPN

Способы установки виртуальной сети

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

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

OpenVPN

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

Стандартно OpenVPN загружается в папку с программными файлами, расположенную на диске C. Поэтому в ходе инструкции мы будем ссылаться к папке «C:Program FilesOpenVPN». Вы хотите изменить месторасположение файлов? Тогда учитывайте этот нюанс в дальнейшем.

Как сгенерировать ключи и выполнить их шифрование, алгоритм Diffie-Hellman

Для каждой пары ключей существуют свои собственные сертификаты, обеспечивающие безопасность передачи информации. Управлять ими можно специальным приложением Easy-rsa, которое запускается и работает в командной строке, аналогично консоли Линукс. Консоль открывается через нажатие клавиш Win + R и ввода в появившемся окне слова cmd.

Как работать с конфигурационным файлом

Загрузив соответствующий конфигурационный файл, нужно внести его вместо одноименного файла/скрипта, найти который можно в папке OpenVPNeasy-rsa. Директория располагается на диске C в Program Files. Или укажите тот путь, куда вы запланировали установку виртуальной частной сети.

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

countryName_default
stateOrProvinceName_default
localityName_default
0.organizationName_default
emailAddress_default

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

Как генерировать ключи в Центре Сертификации

1. Для начала следует переименовать два файла при помощи командной строки:

cd cd "C:Program FilesOpenVPNeasy-rsa" ren index.txt.start index.txt ren serial.start serial

2. Затем, чтобы создать новый ключ/сертификат, понадобится запуск скрипта:

.build-ca.bat

В окне будут возникать различные предложения, большинство из них можно подтверждать кнопкой Enter. А для поля KEY_CN (Common Name) следует ввести оригинальное название и его же продублировать для поля name.

3. Так же генерируются сертификаты серверу. В этой строке вместе server нужно ввести оригинальное имя:

.build-key-server.bat server

4. Система начнет спрашивать, следует ли подписывать сертификаты для создаваемых ключей от имени Центра сертификации? Введите «да» — y (yes).

OpenVPN

Как генерировать клиентский ключ и сертификат

Всем юзерам виртуальной сети понадобится генерировать свои индивидуальные SSL-сертификаты.

Можно воспользоваться специальной опцией, которая позволяет присваивать 1 сертификат сразу нескольким пользователям. Она называется «dublicate-cn» и размещается в файле server.ovpn. Однако такой ход небезопасен.

Рассмотрим, как сгенерировать сертификат клиенту client2:

cd cd "C:Program FilesOpenVPNeasy-rsa" .build-key.bat client2

Внимание: под переменной client2 подразумевается вносимое название файла. Далее следует ввести client2 в запрос строчки Common Name.

Работа с алгоритмом Диффи-Хеллмана

В завершение всех действий понадобится запуск шифрования, чтобы сгенерировать группу параметров по Диффи-Хеллману:

.build-dh.bat

OpenVPN

Перенос сгенерированных ключей/сертификатов

Все созданные данные располагаются в подпапке easy-rsakeys. Следующие наименования файлов следует перенести в другую подпапку — config, которая располагается в том же месте:

• dh2048.pem/dh1048.pem

• server.key

• ca.crt

• server.crt

Настройка конфигурации на сервере

Запустите редактор реестра и отыщите в нем:

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters.

Справа вы увидите IPEnableRouter. Кликните по переменной два раза – откроется новое окошко для изменения параметров. В поле «Значение» поставьте единицу:

OpenVPN

Настраивать сервер мы будем через конфигурационный файл server.ovpn. Перед работой его следует переместить в папку config.

Открыв его, необходимо проверить правильность построение маршрутов к перенесенным сертификатам:

port 1194
proto udp
dev tun
server 10.8.0.0 255.255.255.0
ca "C:Program FilesOpenVPNconfigca.crt"
cert "C:Program FilesOpenVPNconfigserver.crt"
key "C:Program FilesOpenVPNconfigserver.key"
dh "C:Program FilesOpenVPNconfigdh2048.pem"
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
keepalive 10 120
comp-lzo
persist-key
persist-tun
verb 3

Если нужно, то меняем пути на правильные и пересохраняем.

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

Из нескольких предложенных вариантов надо взять тот, что отвечает за внешние подключения, то есть не TAP-тип, так как он работает с VPN-соединениями.

OpenVPN

В свойствах зайдите на вкладку доступа и поставьте галочки на обоих пунктах:

Следующим шагом включается айпи-переадресация.

Зайдите в стандартный поиск ОС си введите следующее имя приложения:

Настройка автозапуска

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

Стандартные настройки окончены. Чтобы запустить сервер и его новые настройки, надо еще раз войти в файл server.ovpn и написать в него следующую строчку:

Start OpenVPN on this config

Настройки клиентской конфигурации

Виртуальная частная сеть имеет свое клиентское приложение, которое одинаково хорошо загружается для любой существующей операционной системы за исключением Mac – к нему разработан Tunnelblick. Версии приложений функционируют одинаково, затрагивают определенные конфигурационные файлы. В зависимости от версий, могут различаться отдельные опции. Более подробная информация расписана в документации OpenVPN.

Далее мы расскажем, как подключить клиентов на ОС Виндовс, применяя те же дистрибутивы, которые до этого инсталлировались на сервере. В случае с другими операционными системами методы и шаги будут примерно такими же.

1. Для начала на ПК клиента ставится актуальная версия (желательно последняя) OpenVPN.

2. Конфигурационные файлы клиента client.ovpn вместе с сертификатами *.crt и ключами *.key, которые перед этим мы сгеренировали, необходимо поместить в подпапку config, хранящуюся в разделе OpenVPN. При этом желательно файл клиента удалить с директории сервера, чтобы не запутаться при будущих настройках.

3. При открытии client.ovpn необходимо отыскать строчку remote my-server-1 1194. Задайте ей айпи и домен работающего сервера:

remote 1194

Например:

remote 111.222.88.99 1194

4. Ниже в файле обозначен путь к каждому сертификату, меняем их на путь к скопированным версиям:

# 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 "C:Program FilesOpenVPNconfigca.crt"
cert "C:Program FilesOpenVPNconfigclient2.crt"
key "C:Program FilesOpenVPNconfigclient2.key"
# This file should be kept secret

5. После сохранения базовые настройки будут окончены.

Как проверить правила брендмауэра

Чтобы функционирование виртуальной частной сети проходило корректно, на стороне сервера необходимо открыть соответствующий порт. Стандартно его имя UDP 1194.

Зайдите в установленный системный Firewall и посмотрите, разрешен ли доступ к порту антивирусным программным обеспечением и брендмауэром.

Как проверить OpenVPN-подключение

После запуска сервера потребуется зайти в папку config. В ней нужно отыскать конфигурационный server.ovpn файл. Кликнуть по нему правой кнопкой, вызвать контекстное меню и внести новую строчку:

Start OpenVPN on this config file

Те же действия необходимо проделать для клиента. Только в этот раз открывается client.ovpn. Остальные действия аналогичны.

Следом должно показаться окно, где отобразится статус соединения. Окно самостоятельно свернется в трею, там же загорится ярлык компьютера с зеленым индикатором (это будет свидетельствовать об успешно проведенной настройке).

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

1. Запустим командную строку комбинацией клавиш Win + R и введением команды cmd.

2. Осуществим пинг к выбранному серверу (10.8.0.1). Для этого введем:

ping 10.8.0.1

3. Если настройка прошла отлично, в окне строки покажется передача пакетов ПК клиента к серверу:

4. Специальная утилита Tracert покажет маршрут, по которому происходит передача клиентских пакетов. Для этого в консоль вводится команда:

tracert ya.ru

Как показывает результат, клиентский пакет отправляется к виртуальному серверу, после чего перенаправляется к внешней сети:

OpenVPN

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

220140
Минск
ул. Домбровская, д. 9

+375 (173) 88-72-49

700
300

ООО «ИТГЛОБАЛКОМ БЕЛ»

220140
Минск
ул. Домбровская, д. 9

+375 (173) 88-72-49

700
300

ООО «ИТГЛОБАЛКОМ БЕЛ»

To download and install openvpn for pc, click on the get openvpn button. Right click openvpnservice then restart :

Awasome Openvpn Client For Windows Server 2012 Ideas, Tutorial installing and configuring vpn. All attempts to install microsoft�s.

Finishing Configuration of Access Server OpenVPN From openvpn.net

This means that rsa3 keys and certificates must be used to establish a network connection between the client and the vpn server. Openvpn access server download occasionally, you may need to revoke a client certificate to prevent further access to the openvpn server. First, install wireguard on the client by running the apt command again. You will be taken to the product page on the official store (mostly it is an official website of the app).

Finishing Configuration of Access Server OpenVPN Right click on your server and choose configure and enable routing and remote access.

Openvpn access server download occasionally, you may need to revoke a client certificate to prevent further access to the openvpn server. Right click openvpnservice then restart : The openvpn community project team is proud to release openvpn 2.4.11. Open the start menu and go to windows system >> and then right click on “ command prompt ” then more and select run as administrator..

Source: mva.ch

Downloading and installing the openvpn connect client for windows. Default settings of vpn on windows server 2012 r2 essentials. From, services management console : OpenVPN unter Windows Server 2012 R2, Server 2016, Server 2019 und.

Source: supporthost.in

Openvpn access server download occasionally, you may need to revoke a client certificate to prevent further access to the openvpn server. Such a configuration file is called a profile and has an. Open the command prompt and go to. Setting Up OpenVPN Server On Windows Server 2012/2016/2019.

Source: itgration.blogspot.com

To download and install openvpn for pc, click on the get openvpn button. Right click server name , and select. This launches the routing and remote access server setup wizard. IT Consulting Install OpenVPN ClientServer Windows.

Source: serverfault.com

We recommend and support openvpn connect v3 as the official app. Right click on your server and choose configure and enable routing and remote access. This completes the basic configuration of the virtual private network server. OpenVPN Client on Windows Server 2012 is not able to change routing.

Source: blog.bobbyallen.me

Open the start menu and go to windows system >> and then right click on “ command prompt ” then more and select run as administrator.. To check the default settings for the vpn, open routing and remote access manager. Tutorial installing and configuring vpn. Setting up OpenVPN Server on Windows 2012 R2 Life in apps, os�s and code!.

Source: supporthost.in

All attempts to install microsoft�s. We recommend and support openvpn connect v3 as the official app. This means that rsa3 keys and certificates must be used to establish a network connection between the client and the vpn server. Setting Up OpenVPN Server On Windows Server 2012/2016/2019.

Source: winxperts4all.at

Open the start menu and go to windows system >> and then right click on “ command prompt ” then more and select run as administrator.. To download and install openvpn for pc, click on the get openvpn button. This means that rsa3 keys and certificates must be used to establish a network connection between the client and the vpn server. OpenVPN Client als Service unter Windows Server 2012 R2.

Source: pacificbits.ucoz.com

All attempts to install microsoft�s. The openvpn community project team is proud to release openvpn 2.4.11. Openvpn source code and windows installers can be downloaded here.recent releases (2.2 and later) are also available as debian and rpm packages; Five Most Used VPN Apps 10 October 2012 Blog PacificBitsStart.

Source: supporthost.in

Right click openvpnservice then restart : To do so, navigate to the easyrsa directory. Installation guide for openvpn connect client on windows. Setting Up OpenVPN Server On Windows Server 2012/2016/2019.

Source: supporthost.in

Right click on your server and choose configure and enable routing and remote access. Tutorial installing and configuring vpn. This completes the basic configuration of the virtual private network server. Setting Up OpenVPN Server On Windows Server 2012/2016/2019.

Source: zdnet.de

Openvpn access server download occasionally, you may need to revoke a client certificate to prevent further access to the openvpn server. In order to connect to the vpn server or service, you need to obtain a file that contains the specifics needed for the connection. The openvpn service must be restarted for the configuration file to be taken into account. OpenVPN Der Standard der OpenSourceVPNs in der Praxis.

Source: afterdawn.com

Open the command prompt and go to. Openvpn access server download occasionally, you may need to revoke a client certificate to prevent further access to the openvpn server. Such a configuration file is called a profile and has an. Download OpenVPN (portable) v1.6.6 (open source) AfterDawn Software.

Source: winxperts4all.at

Such a configuration file is called a profile and has an. From, services management console : After disabling the proxy while vpn is established, a tracert would route directly over to vpn to the destination. OpenVPN Client als Service unter Windows Server 2012 R2.

Source: winxperts4all.at

You will be taken to the product page on the official store (mostly it is an official website of the app). For further information, refer to: Right click openvpnservice then restart : OpenVPN Client als Service unter Windows Server 2012 R2.

Source: mva.ch

From, services management console : Right click openvpnservice then restart : Such a configuration file is called a profile and has an. OpenVPN unter Windows Server 2012 R2, Server 2016, Server 2019 und.

Source: heise.de

We recommend and support openvpn connect v3 as the official app. Tutorial installing and configuring vpn. You will be taken to the product page on the official store (mostly it is an official website of the app). OpenVPN MI GUI heise Download.

Source: softether.org

To do so, navigate to the easyrsa directory. Default settings of vpn on windows server 2012 r2 essentials. Openvpn access server download occasionally, you may need to revoke a client certificate to prevent further access to the openvpn server. 1. Ultimate Powerful VPN Connectivity SoftEther VPN Project.

Source: yodelcin.blogspot.com

You will be taken to the product page on the official store (mostly it is an official website of the app). To do so, navigate to the easyrsa directory. We recommend and support openvpn connect v3 as the official app. To Make us grow better VPNBOOK OpenVPN How to set up OpenVPN on.

Source: supporthost.in

The openvpn service must be restarted for the configuration file to be taken into account. To do so, navigate to the easyrsa directory. Open the command prompt and go to. Setting Up OpenVPN Server On Windows Server 2012/2016/2019.

Source: openvpn.net

For further information, refer to: This completes the basic configuration of the virtual private network server. In my previous post i wrote about how to setup an ssl vpn server on windows 2012 r2 and enable external network access to the server using openvpn. Finishing Configuration of Access Server OpenVPN.

Source: lisenet.com

All attempts to install microsoft�s. To download and install openvpn for pc, click on the get openvpn button. Installing the openvpn server software. OpenVPN Server and Client Setup on Windows Linux.

Source: listvpn.blogspot.com

Openvpn source code and windows installers can be downloaded here.recent releases (2.2 and later) are also available as debian and rpm packages; Open the command prompt and go to. In order to connect to the vpn server or service, you need to obtain a file that contains the specifics needed for the connection. Setup Openvpn Server On Mac Os X.

Source: softether.org

First, install wireguard on the client by running the apt command again. In order to connect to the vpn server or service, you need to obtain a file that contains the specifics needed for the connection. Openvpn source code and windows installers can be downloaded here.recent releases (2.2 and later) are also available as debian and rpm packages; 1. Ultimate Powerful VPN Connectivity SoftEther VPN Project.

Source: serverfault.com

Open the command prompt and go to. For further information, refer to: Right click openvpnservice then restart : OpenVPN Client on Windows Server 2012 is not able to change routing.

Source: techbast.com

Such a configuration file is called a profile and has an. To download and install openvpn for pc, click on the get openvpn button. In my previous post i wrote about how to setup an ssl vpn server on windows 2012 r2 and enable external network access to the server using openvpn. Solved Sophos SSL VPN client is connected but no route Techbast.

Open The Start Menu And Go To Windows System >> And Then Right Click On “ Command Prompt ” Then More And Select Run As Administrator..

We recommend and support openvpn connect v3 as the official app. You will be taken to the product page on the official store (mostly it is an official website of the app). Right click openvpnservice then restart : Openvpn source code and windows installers can be downloaded here.recent releases (2.2 and later) are also available as debian and rpm packages;

Downloading And Installing The Openvpn Connect Client For Windows.

To do so, navigate to the easyrsa directory. To download and install openvpn for pc, click on the get openvpn button. First, install wireguard on the client by running the apt command again. To check the default settings for the vpn, open routing and remote access manager.

Installing The Openvpn Server Software.

For further information, refer to: Right click server name , and select. This completes the basic configuration of the virtual private network server. In my previous post i wrote about how to setup an ssl vpn server on windows 2012 r2 and enable external network access to the server using openvpn.

Open The Command Prompt And Go To.

It doesn�t matter whether this is secure or not, this is. Right click on your server and choose configure and enable routing and remote access. In order to connect to the vpn server or service, you need to obtain a file that contains the specifics needed for the connection. Default settings of vpn on windows server 2012 r2 essentials.

Задача подключиться к серверу под управлением Windows Server 2012 R2 по OpenVPN туннелю.

1. On Server

1.1. Download and install OpenVPN https://swupdate.openvpn.org/community/releases/openvpn-install-2.3.14-I601-x86_64.exe

1.2. Reboot server

1.3. Run «cmd» as Administrator

1.4. cd «C:\Program Files\OpenVPN\easy-rsa»

1.5. md keys

1.6. init-config.bat

1.7. Edit vars.bat

set OPENSSL_CONF=openssl-1.0.0.cnf
set KEY_SIZE=2048
set KEY_COUNTRY=RU
set KEY_PROVINCE=70
set KEY_CITY=Tomsk
set KEY_ORG=AKTM
set KEY_EMAIL=keys@aktm.com
set KEY_CN=winsrv-001
set KEY_NAME=winsrv-001
set KEY_OU=OVT

1.8. vars.bat

1.9. clean-all.bat

1.10. build-dh.bat

1.11. build-ca.bat

Press only «Enter»

1.12. build-key-server server

Press only «Enter» and «y»

1.13. Edit index.txt.attr

unique_subject = no

1.14. build-key.bat client

Press only «Enter» and «y»

1.15. copy ca.crt dh2048.pem server.crt server.key to «C:\Program Files\OpenVPN\config\»

1.16. copy «c:\Program Files\OpenVPN\sample-config\server.ovpn» «c:\Program Files\OpenVPN\config\»

1.17. Edit server.ovpn

port 12345
topology subnet
comp-lzo
# explicit-exit-notify 1

1.18. Run OpenVPN GUI from Desktop

1.19. DblClick systemtray icon

1.20. Click Reconnect. Wait Green SysTray icon.

1.21. Allow UDP port 12345 to incommind

2. Client

2.1. Download and install OpenVPN https://swupdate.openvpn.org/community/releases/openvpn-install-2.3.14-I601-x86_64.exe

2.2. copy ca.crt client.crt client.key dh2048.pem from server to client PC «C:\Program Files\OpenVPN\config\»

2.3. copy «c:\Program Files\OpenVPN\sample-config\client.ovpn» «c:\Program Files\OpenVPN\config\»

2.4. Edit client.ovpn

remote 192.168.0.178 12345
comp-lzo

2.5. Run OpenVPN GUI from Desktop

2.6. DblClick systemtray icon

2.7. Click Reconnect. Wait Green SysTray icon.

This is a step-by-step guide on how to configure an Open VPN server on Windows Server 2008/2012 operating systems and connect clients to the created virtual private network.

Open VPN is an open implementation of VPN technology — the Virtual Private Network, which is designed to create virtual private networks between groups of geographically distant nodes on top of an open data transmission channel (Internet). Open VPN is suitable for tasks such as secure remote network connection to a server without opening Internet access to it, as if you are connecting to a host on your local network. Connection security is achieved by Open SSL encryption.

How it works?

When the Open VPN configuration is completed, the server will be able to accept external SSL-protected network connections to the virtual network adapter created at the start of the VPN service (tun / tap) without affecting the traffic processing rules of other interfaces (external Internet adapter, etc.). You can configure client sharing Open VPN to a specific network adapter from those present on the server. In the second part of the instruction, this tunneling of users’ Internet traffic is considered. With this method of forwarding, the host that handles VPN connections will also perform the function of a proxy server (Proxy) — to unify the rules of network activity of users and to route client Internet traffic on its own behalf.

Installing Open VPN on the server

Download and install version of Open VPN that matches your operating system. Run the installer; make sure that all features are selected for installation in the third step of the installation wizard.

open VPN -- install open VPN-choose all_1

Please note that in this instruction further commands are based on the fact that Open VPN is installed in the default directory «C: \ Program Files \ OpenVPN».

We allow adding a virtual network adapter TAP in response to the corresponding request and wait until the installation is complete (it may take several minutes).

Key generation (PKI) of the certification center, server, client; Diffie-Hellman algorithm

To manage the key / certificate pairs of all nodes of the private network being created, use the easy-rsa utility, which works via the command line, by analogy with the Linux console. To work with it, open, run the command line (Keyboard shortcut Win + R, then type cmd and press Enter)

Configuration files.

Running init-config.bat script will generate a new vars.bat file in our easy-rsa directory, this file will contain our configuration:

cd "C:\Program Files\OpenVPN\easy-rsa"
init-config.bat

So now we need to open up the following directory using Windows Explorer: C:\Program Files\OpenVPN\easy-rsa

Now, using Notepad (or another text editor) edit the batch file named vars.bat, we need to configure some variables…

Change the following settings (nearer the bottom of the file) to meet your requirements:

set KEY_COUNTRY=US
set KEY_PROVINCE=CA
set KEY_CITY=SanFrancisco
set KEY_ORG=OpenVPN
set KEY_EMAIL=mail@host.domain
set KEY_CN=changeme
set KEY_NAME=changeme

Note: if the value of the variable contains a space, enclose it in quotes.

Next you should save the changes to the file and then using Command Prompt, run the following commands:

cd "C:\Program Files\OpenVPN\easy-rsa"
vars.bat
clean-all.bat

Certification Center and Server Key Generation

Let’s proceed to the creation of the key / certificate of the certification authority. Run the script:

build-ca.bat

In response to the prompts that appear, you can simply press Enter. The only exception is the KEY_CN (Common Name) field — be sure to specify a unique name and insert the same name in the Name field:

open VPN -- install open VPN-ca generation

Similarly, we generate a server certificate. Here the value of the Common Name and Name fields is SERVER:

.\build-key-server.bat server

Note: the server argument is the name of the future file.

All generated keys will now be asked whether to sign the generated certificate (Sign the certificate) on behalf of the certification authority. Answer y (yes).

open VPN -- install open VPN-server key generation

Generating client keys and certificates

For each VPN client, you need to generate a separate SSL certificate.

There is an option in the Open VPN configuration, by enabling which you can use one certificate for several clients (see the server.ovpn file -> «dublicate-cn» file), but this is not recommended from a security point of view. Certificates can be generated in the future, as new customers connect. Therefore, now we will create only one for client1:

Run the following commands to generate client keys:

cd \
cd "C:\Program Files\OpenVPN\easy-rsa"
.\build-key.bat client1

Note: client1 argument is the name of the future file.

In the Common Name field, specify the name of the client (in our case client1).

open VPN -- install open VPN-client key generation

Diffie Hellman Parameters

To complete the encryption setting, you need to run the Diffie-Hellman parameter generation script:

.\build-dh.bat

Displaying information about creating parameters looks like this:

open VPN -- install open VPN-dh generation

Transferring generated keys / certificates

The generated certificates are located in the C: \ Program Files \ OpenVPN \ easy-rsa \ keys directory. Copy the files listed below to the directory C:\Program Files\OpenVPN\config:

  • ca.crt
  • dh2048.pem/dh1048.pem
  • server.crt
  • server.key

Open VPN server configuration

Let’s proceed to the configuration of the VPN server directly, use our configuration file with the name server.ovpn and place it in the C: \ Program Files \ OpenVPN \ config directory.

copy "C:\Program Files\OpenVPN\sample-config\server.ovpn" "C:\Program Files\OpenVPN\config"
copy "C:\Program Files\OpenVPN\sample-config\client.ovpn" "C:\Program Files\OpenVPN\config"

    Open the file; find the path to the keys (see below). Check the paths to the previously copied certificates ca.crt, dh1024.pem / dh2048.pem, server.key, server.crt and, if necessary, change:

    port 1194
    proto udp
    dev tun
    server 10.8.0.0 255.255.255.0
    ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
    cert "C:\\Program Files\\OpenVPN\\config\\server.crt"
    key "C:\\Program Files\\OpenVPN\\config\\server.key"
    dh "C:\\Program Files\\OpenVPN\\config\\dh2048.pem"
    push "redirect-gateway def1"
    push "dhcp-option DNS 8.8.8.8"
    keepalive 10 120
    comp-lzo
    persist-key
    persist-tun
    verb 3

    Save the file.

    Now you need to allow traffic forwarding between adapters. Follow these steps: Control Panel -> Network and Internet -> Network and Sharing Center -> Change adapter settings. Choose an adapter that looks to the external Internet (TAP-adapter is responsible for the VPN connection). In our example, this is Ethernet 2.

    Double-click the adapter Properties and go to the Access tab, tick all the checkboxes. Save the changes.

    Next you need to enable IP addressing.

    Using Windows Search, locate the REGEDIT.exe application.

    In the tree, find the directory HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Tcpip \ Parameters. In the right part of the window, find the IPEnableRouter variable, double-click into the value editing window and change it to 1, thereby allowing addressing on the VPS.

    open VPN -- enable ip addressing regedit

      Autorun Open VPN

      Immediately configure the Open VPN service to autorun at system startup.

      Open the Windows Services. Find in the list Open VPN -> right-click -> Properties -> Start: Automatic

      open VPN -- enable service.png

      This completes the basic configuration of the virtual private network server. Find the file C: \ Program Files \ OpenVPN \ config \ server.ovpn -> right-click -> «Start OpenVPN on this config» to start the virtual private network server and the configuration file we prepared.

      Open VPN Client Configuration

      Open VPN client applications are available for all popular operating systems: Windows / Linux / iOS / Android. For MacOS, the Tunnelblick client is used. All of these applications work with the same configuration files. Only some differences of several options are possible. You can learn about them by examining the documentation for your Open VPN client. In this guide, we will look at connecting a Windows client using the same distribution package of the program that we installed on the server. When using applications for other operating systems, the setup logic is similar.

      1. Install the current version of Open VPN on the client computer.
      2. Copy to the directory C: \ Program Files \ OpenVPN \ config the client certificate files created earlier on the server (2 certificates with the .crt extension and the key with the .key extension) and use our client.ovpn client configuration file. After copying to the user’s device, the last file is deleted from the server or transferred from the config folder to avoid confusion in the future.
      3. Open the client.ovpn file. Find the line remote my-server-1 1194 and specify the ip-address or domain name of the vpn-server in it:

        remote <ip-address> 1194</ip-address>

        For example:

        remote 83.166.241.155 1194
      4. Find ways to certificates. Specify in it the paths to the ca.crt, client1.key, client1.crt certificates copied earlier as in the example below:

        # 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 "C:\\Program Files\\OpenVPN\\config\\ca.crt"
        cert "C:\\Program Files\\OpenVPN\\config\\client1.crt"
        key "C:\\Program Files\\OpenVPN\\config\\client1.key"
        # This file should be kept secret
      5. Save the file. Client setup complete.

      Verify Windows Firewall Rules

      Attention! For the correct operation of the OpenVPN service, it is required that the corresponding ports be opened on the server (by default UDP 1194). Check the relevant rule in your Firewall: Windows Firewall or third-party anti-virus software.

      Check OpenVPN connections

      Start the Open VPN server, to do this, go to the directory C: \ Program Files \ OpenVPN \ config and select the server configuration file (we have server.ovpn -> right-click -> «Start OpenVPN on this config file»).

      Start the client, to do this, go to the directory C: \ Program Files \ OpenVPN \ config and select the client configuration file (we have client.ovpn -> right-click -> «Start Open VPN on this config file»).

      The screen displays the connection status window. In a few seconds it will be minimized to tray. The green indicator of the Open VPN shortcut in the notification area indicates a successful connection.

      Check the accessibility from the client device of the OpenVPN server using its internal private network address:

      1. Press the Win + R keys and type cmd in the window that appears to open the command line.
      2.  Execute the ping command to the address of our server in a virtual private network (10.8.0.1):

        ping 10.8.0.1

        If the VPN is configured correctly, the packet exchange with the server will start.

        openVPN -- ping.png

      3. With the help of the tracert utility, we will check on which route the packets from the client go. In the console, enter the following command:

      From the result of the utility, we see that the packets are first sent to the VPN server, and only then to the external network.

      Now you have a ready-to-work virtual private network that allows you to make secure network connections between its clients and the server using open and geographically distant points of connection to the Internet.

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

      0 комментариев
      Старые
      Новые Популярные
      Межтекстовые Отзывы
      Посмотреть все комментарии
    1. Как вернуть классическое средство просмотра фотографий в windows 11
    2. Настройка сервера postgresql windows
    3. Windows android root explorer
    4. Куда скачиваются приложения windows 10
    5. Windows 10 pro сборка 18363