OpenVPN : Configure VPN Client (Windows)2024/07/19 |
Configure VPN Client. This example is on Windows 11.
This example is based on the environment like follows.
By settings of OpenVPN Server/Client, [tun] interface will be configured automatically and when connecting with VPN from Client to Server, Client can access to the the local network of the Server.
On this example, it needs to set IP Masquerading on Router, too.
+----------------------+ | [ OpenVPN Server ] |172.16.100.1 | dlp.srv.world +--------+ | |tun | +-----------+----------+ | enp1s0|10.0.0.30 | | | | Local Network | 10.0.0.1| | +------+-----+ | -------| Router |-------------|----- +------+-----+ | | | | Internet | --------------+-------------------|----- | | | Local Network | 192.168.0.30| | +-----------+----------+ | | |tun | | VPN Client +--------+ | |172.16.100.x +----------------------+ |
[1] |
Download OpenVPN client from the site below and install it.
⇒ https://openvpn.net/community-downloads/ |
[2] | After installing OpenVPN client, copy the file [client.ovpn] which is under the [C:\Program Files\OpenVPN\sample-config]
into [C:\Program Files\OpenVPN\config] and rename it to the name which you named when created client certificates on the VPN Server. Furthermore, copy files [ca.crt], [client1.crt], [client1.key], [ta.key] which you created on the server to the same folder like follows. |
![]() |
[3] | Open the file [client.ovpn] (the name is before renaming) with text editor like notepad and edit like follows. |
# OK with default
client
# protocol which you specified in the server's config
;proto tcp proto udp
# OpenVPN server's global IP and port (replace to your own environment)
remote 172.16.2.1 1194
# retry resolving
resolv-retry infinite
# no bind for local port
nobind
# enable persist options
persist-key persist-tun
# path to certificates
ca ca.crt cert client1.crt key client1.key
# path to TLS-Auth key
# log leveltls-auth ta.key 1 verb 3 |
[4] | Start [OpenVPN GUI], then the icon of it will be shown in Taskbar, right-click it and select [Connect] like follows. |
![]() |
[5] | After connecting successfully, the status will be [Connected]. |
![]() |
[6] | After connecting, TAP adapter is added like follows. |
![]() |
[7] | It's possible to access to OpenVPN server with their local address. |
![]() |
Sponsored Link |