OpenVPN

From IPLOG
Jump to: navigation, search

Introduction

The purpose of this document is to describe how to create a VPN connection between IPLOG device(s) and a server via OpenVPN.

This document describes

  • OpenVPN server installation and configuration on a Debian machine
  • OpenVPN client installation and configuration on an IPLOG device
  • OpenVPN client installation and configuration on Windows 10 machine


OpenVPN

OpenVPN is an open-source commercial software that implements virtual private network (VPN) techniques to create secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities. It uses a custom security protocol that utilizes SSL/TLS for key exchange. It is capable of traversing network address translators (NATs) and firewalls. It was written by James Yonan and is published under the GNU General Public License (GPL).

All information about OpenVPN at the link openvpn.net


OpenVPN Server

OpenVPN server is available as a standard package in many Linux distributions. This document is focused on Debian distribution.

Install Server

The following command installs the OpenVPN package witch contains both the server and the client.

metel@debian:~$ apt-get install openvpn

Configure Server

The files, as specified in table below, need to be installed first. These files can be generated, as specified in RD-02(TBW).

File extension Description
ca.crt This file contains root CA certificate.
server.crt This file contains server certificate.
server.key This file contains the server private key.
dh2048.pem This file is needed.
server.conf This file is OpenVPN server configuration. The extension .conf is mandatory, but the filename can be changed.

The following lines need to be included /etc/openvpn/server.conf

# port number and protocol(tcp/udp) can be changed as needed
port 1194
proto tcp

dev tun

ca ca.crt
cert server.crt
dh dh2048.pem

# this is IP adrress range used by OpenVPN server
server 172.16.0.0 255.255.255.0

# the following line enables communication among clients 
client-to-client

comp-lzo
persist-key
persist-tun


OpenVPN Client for IPLOG Device

The OpenVPN client is already installed in all IPLOG devices.

Configure Client

The files in table below are needed before configuration. These files can be generated, as specified in RD-02(TBW).

File extension Description
ca.crt This file contains root CA certificate.
client01.crt This file contains client certificate.
client01.key This file contains the client private key.
client01.conf This file is OpenVPN client configuration. The extension .conf is mandatory, but the filename can be changed.

The following lines need to be included /etc/openvpn/client01.conf

client

proto tcp
remote vpn.iplog.eu 1195

dev tun

resolv-retry infinite
nobind

persist-key
persist-tun

ca ca.crt
cert client01.crt
key client01.key

comp-lzo
route-method exe
route-delay 2


OpenVPN Client for Windows

This section describes how to install the OpenVPN client into Windows 10.

Install Client

1. Download installation file at the link Download OpenVPN.

2. Wait until the download completes, and then open it.

3. Follow the install Wizard. Click on the Next to start the installation.

Welcome.png


Confirm the License Agreement.

License Agreement.png


Choose the  OpenVPN components you wish to install.

Components.png


Choose the location to run the installatiom and click on the Install button.

File Location.png


The Install Wizard automatically starts to install all components, when the Complete label appears continue by clicking Next.

Complete.png


The Installation is completed. Show Readme allows you to view a basic configuration information.

End Wizard.png


Configure Client

The files in the table below are needed for configuration. These files can be generated and specified in RD-02(TBW).

File extension Description
ca.crt This file contains root CA certificate.
client01.crt This file contains client certificate.
client01.key This file contains the client private key.
client.ovpn This file is OpenVPN client configuration. The extension .conf is mandatory, but the filename can be changed.

a) Run the OpenVPN Program

The OpenVPN message. No config files were imported into the program.

OpenVPNMessage.png

b) Copy and Edit File

C:\Program Files\OpenVPN\sample-config\client.ovpn to C:\Users\Root\OpenVPN\config

The following lines need to be included C:\Users\Root\OpenVPN\config\client.ovpn

client

proto tcp
remote vpn.iplog.eu 1195

dev tun

resolv-retry infinite
nobind

persist-key
persist-tun

ca ca.crt
cert client01.crt
key client01.key

comp-lzo
route-method exe
route-delay 2


Connection to VPN

Right click to the OpenVPN icon in the notification area of Taskbar, select Connect.

OpenVPNTaskBar.png


A Successful connection is logged in the dialog window, Initialization Sequence Completed.

OpenVPNConnection.png