CentOS 6
Sponsored Link

OpenVPN : Clients' Settings2015/03/31

 
Configure Clients to connect to OpenVPN server.
This example shows settings on Windows 8.1 client.
This example is based on the environment like follows.
Configure OpenVPN with bridge mode, br0 and tap0 on the OpenVPN server is generated automatically by the service, IP address of tap0 on the Clients is assigned by OpenVPN server. Clients can access to any computer on the same local network after connecting with VPN.
Before configuration, it's necessarry to configure IP Masquerading on the gateway router.
For the case of example below, connections to x.x.x.x:1194 are forwarded to 192.168.0.30:1194.
              +----------------------+
              | [  OpenVPN Server  ] |
          tap0|     dlp.srv.world    |eth0
              |                      |
              +-----------+----------+
         192.168.0.30:1194|br0
                          |
               192.168.0.1|
                   +------+-----+
-------------------|   Router   |---------------------
                   +------+-----+
                          |x.x.x.x:1194
          +---------------+--------------+    Internet
          |                              |
----------+------------------------------+------------
          |     +------------------+     |
          | tap0|                  |eth0 |
          +-----+    VPN Client    +-----+
     192.168.0.x|                  |10.0.0.10
                +------------------+

[1]
Download OpenVPN client from the site below and install it.
⇒ http://openvpn.net/index.php/open-source/downloads.html
[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. Furthermore, copy files "ca.crt", "client01.crt", "client01.key" which you created on the server to the same folder like follows.
[3] Open the file "client.ovpn" (before renaming) with text editor like memopad and edit like follows.
# it's OK with default
client
# device name which you specified in the server's config
dev tap0
;dev tun
# protocol which you specified in the server's config
proto tcp
;proto udp
# OpenVPN server's global IP abnd 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 for certificates
ca ca.crt
cert client01.crt
key client01.key
# enable compress
comp-lzo
# log level
verb 3

[4] Open Start Menu and click "OpenVPN GUI" with right button and select "run with admin".
[5] Click OpenVPN icon which is in taskbar with right button and select "connect".
[6] After connecting, the color of icon turns green.
[7] After connecting, TAP adapter is added like follows.
[8] Because of bridge mode configuration, client can connect not only OpenVPN server but other computers on the same network like follows.
Matched Content