Download as pdf or txt
Download as pdf or txt
You are on page 1of 56

VPN installation and configuration

REF: CC10206-4
For Agilia Connect Link+ product range
Table of Contents

1. Introduction ............................................................................................................. 4
Terminology and abbreviations ............................................................................................................. 4

Installation pre-requisites ....................................................................................................................... 4

Concurrent usage of certificates between OpenVPN server and Link+ client ...................................... 4

How to retrieve the Link+ software version ........................................................................................... 5

2. How to install OpenVPN server version 2.3.6 ....................................................... 6


Select the binary to be installed ............................................................................................................. 6

Install the OpenVPN server ................................................................................................................... 6

3. How to install OpenVPN server 2.5.0................................................................... 10


Select the binary to be installed ...........................................................................................................10

Install the OpenVPN server .................................................................................................................10

4. How to configure OpenVPN server 2.3.6............................................................. 13


Generate the authority certificate for OpenVPN server .......................................................................13

Generate the certificate and key for the OpenVPN server ..................................................................15

Generate certificates and keys for Link+ clients (5 steps per Link+ client) .........................................17

Generate Diffie Hellman parameters for the OpenVPN server ...........................................................18

How to update server and client configuration files .............................................................................19

Prerequisites ........................................................................................................................................19
How to create server configuration file “server.oVPN” ........................................................................19
5. How to configure OpenVPN server 2.5.0............................................................. 25
Generate the authority certificate for OpenVPN server .......................................................................25

Generate the certificate and key for the OpenVPN server ..................................................................27

Generate the certificates and keys for Link+ OpenVPN clients ..........................................................29

Generate Diffie Hellman parameters for the OpenVPN server ...........................................................31

Server and client configuration files.....................................................................................................32

Phase 1: copy the files ........................................................................................................................32


Phase 2: creating server configuration file “server.oVPN” ..................................................................32
6. How to configure the OpenVPN server for concurrent usage .......................... 34
How to generate the authority certificate for OpenVPN server ...........................................................34

How to generate the certificate and key for the OpenVPN server ......................................................36

2
How to generate certificates and keys for Link+ OpenVPN clients .....................................................37

Generate Diffie Hellman parameters for the OpenVPN server ...........................................................38

How to configure Server and client files for concurrent use in server 2.3.6 ........................................39

Phase 1: Files copy .............................................................................................................................39


Phase 2: Create server configuration file “server.oVPN” ....................................................................39
Server and client configuration files for concurrent use in server 2.5.0 ..............................................40

Phase 1: Files copy .............................................................................................................................40


Phase 2: Create server configuration file “server.oVPN” ....................................................................40
7. How to launch OpenVPN server .......................................................................... 41
How to manually start OpenVPN server ..............................................................................................41

How to launch OpenVPN server as a Windows service ......................................................................43

For OpenVPN 2.3.6 .............................................................................................................................43


For OpenVPN 2.5.0 .............................................................................................................................44
How to check OpenVPN server status ................................................................................................44

For OpenVPN2.3.6 with Graphical Interface .......................................................................................44


For OpenVPN 2.5.0 without Graphical Interface .................................................................................46
How to check communication between the OpenVPN server and the Link+ client ............................46

8. How to configure OpenVPN client ....................................................................... 46


Link+ client configuration .....................................................................................................................47

9. Connection between OpenVPN and Link+ verification ...................................... 51


Serial communication on TCP activation verification ..........................................................................51

VPN connection configuration verification ...........................................................................................52

10. Troubleshooting .................................................................................................... 53


Sections 4 and 5 .............................................................................................................................53

Section 7.3, in case of Open VPN connection failure .....................................................................53

Section 9.2, in case of IP address issue.........................................................................................53

Link+ and OpenVPN server cannot communicate .........................................................................54

11. Best practices ....................................................................................................... 54


Time configuration ..........................................................................................................................54

Static virtual IP address ..................................................................................................................54

3
1. Introduction
This document outlines the installation and configuration procedures for an OpenVPN server in a Microsoft
Windows environment and the configuration of Link+ clients. It also provides information about the concurrent
usage of OpenVPN certificates as required.

The OpenVPN installation ensures secure transmission of data between the Link+ and a third-party application
connected over TCP/IP.

This document covers the following needs:

1. How to install the OpenVPN server;


2. How to configure the OpenVPN server;
3. How to start the OpenVPN server;
4. How to configure and connect Link+ clients to the OpenVPN server.

Terminology and abbreviations

NTP : Network Time Protocol

OpenVPN : Client/server software for open virtual private network

D14/D15/D16 : Release versions of the embedded Link+ software.

Installation pre-requisites
The following two conditions are necessary for the successful installation of OpenVPN:

• The PC or server must run Microsoft Windows. Please refer to Table 2 and Table 3 in sections below
for supported versions.

• OpenVPN installation requires administrator access rights.

Concurrent usage of certificates between OpenVPN server and Link+ client


The following table provides a view on possible concurrent usage of OpenVPN certificates versions.

Required OpenVPN server


Configuration Required certificate
version
Link+ with D14 or
D15 software 2.3.6 Generated by OpenVPN server 2.3.6
versions
Link+ with D16
2.5.0 Generated by OpenVPN server 2.5.0
software version
Link+ with D14 or
2.3.6
D15 and D16 Generated by OpenVPN server 2.3.6*
software versions Or 2.5.0
Table 1 OpenVPN certificates matrix

4
* Note the OpenVPN server 2.3.6 is only used to generate the certificates/keys, and OpenVPN server 2.5.0 is
used to launch the VPN service. Do not keep OpenVPN server 2.3.6 and OpenVPN server 2.5.0 installed
at the same time on the target PC or server, it will lead to errors when launching the OpenVPN server.

How to retrieve the Link+ software version


The Link+ internal version can be retrieved by following the steps below:
1. Connect to the Link+ Web interface.
2. Select “Configuration” → “General Parameters”.
3. The 3 last digits of the “Internal Version” field correspond to the Link+ software release (see Figure 1).

Figure 1 : Retrieving Link+ software version

5
2. How to install OpenVPN server version 2.3.6
Select the binary to be installed
For the OpenVPN installation, select the installation binary from https://build.openVPN.net/downloads/releases/
depending on the target OS (see table below).

openVPN-install-2.3.6-I003-i686.exe Windows XP versions 32-bit

openVPN-install-2.3.6-I003-x86_64.exe Windows XP versions 64-bit

openVPN-install-2.3.6-I603-i686.exe Windows Vista versions 32-bit and later releases

openVPN-install-2.3.6-I603-x86_64.exe Windows Vista versions 64-bit and later releases

Table 2 : OpenVPN Server 2.3.6 binary to install depending on target OS

Install the OpenVPN server


1. Start the installation process by double clicking on the executable file with administrator rights.
➢ The welcome setup wizard (Figure 2) opens:

Figure 2: OpenVPN Welcome setup wizard


Click on « Next > ».

6
➢ The license agreement (Figure 3) opens:

Figure 3: License agreement

Read carefully the terms of the License Agreement. Then, click on « I Agree ».

➢ The OpenVPN Setup window opens (Figure 4):

Figure 4: OpenVPN installation configuration

Check the box OpenSSL Utilities.


Check the box Open VPN RSA Certificate Management Scripts (needed to configure the server and generate
keys).

Click on « Next > ».

7
2. Select the desired installation directory (Figure 5).
For example: C:\Program Files\OpenVPN. There are no restrictions on this location.

Note: This directory will be called <OpenVpnPath> in the rest of the document.

Figure 5: Select install location


Click on « Install ».

3. The installation starts. Windows may request confirmation to install the TAP-WIN32 driver: if so, please confirm
the installation (Figure 6).

Figure 6: Confirmation of installation of the TAP-Win32 driver

Click on « Install ». The installation of the driver starts.

8
When installation is complete the following window opens (Figure 7):

Figure 7: Installation complete

The message « Installation Complete » confirms that the installation successfully completed.

Click on « Next > ». The following window opens (Figure 8):

Figure 8: End of setup wizard

Un-check the box to start OpenVPN and click on “Finish”. You may read the OpenVPN Readme as desired.

An OpenVPN GUI icon is added to the computer desktop:

9
3. How to install OpenVPN server 2.5.0
Select the binary to be installed
For the OpenVPN installation, select the installation binary from https://openVPN.net/community-downloads/
or https://build.openVPN.net/downloads/releases/ depending on the target OS (see table below).

openVPN-2.5.0-i601-amd64.msi Windows 64-bit MSI Installer

openVPN-2.5.0-i601-x86.msi Windows 32-bit MSI Installer

Table 3 : OpenVPN Server 2.5.0 binary to install depending on target OS

Install the OpenVPN server


1. Start the installation process by double clicking on the executable file.
➢ The Choose setup type (Figure 9) opens:

Figure 9 : Choose setup type


Click on « Customize ».

10
➢ The Custom Installation (Figure 10) opens:

Figure 10 : Custom Installation

Click on OpenVPN Service and choose Entire feature will be installed on local hard drive.

Click on OpenSSL Utilities and choose Entire feature will be installed on local hard drive (needed to
configure the server and generate keys).
Select the desired installation directory.
• For example: C:\Program Files\OpenVPN.
• There are no restrictions on this location.
Note: This directory will be called <OpenVpnPath> in the rest of the document.

Click on « Install Now ».

The installation starts. Windows may request confirmation to install the driver, if so, please confirm the
installation. When installation is finished, the OpenVPN Installing Completed dialog window opens (Figure 11):

Figure 11 : OpenVPN Installing Completed


Click on « Close ».

An OpenVPN GUI icon is added to the computer desktop:

11
Bring up the “System Properties” of the computer, click on “Environment Variables”, then select Path” under
“System variables” and click “Edit”. In the “Edit environment variable” popup window adds a new entry with value
“C:\Program Files\OpenVPN\bin”, then click “OK”. See Figure 12 below.

Figure 12 : Edit environment variable

12
4. How to configure OpenVPN server 2.3.6
Generate the authority certificate for OpenVPN server
1. Open a DOS console (cmd.exe) as an administrator. To do so, bring up Windows Run dialog window by
clicking Windows+R keys, then enter cmd.exe, right-click on the resulting icon selection and select “Run
as administrator”.
2. In the DOS console, run the command cd <OpenVpnPath>\easy-rsa

For example: cd C:\Program Files\OpenVPN\easy-rsa

3. In the DOS console, run the command init-config.bat

➢ The configuration file vars.bat.sample is copied for initialization (see Figure 13)

Figure 13 : Initialization file


4. Through the Windows explorer (Windows+R, see Figure 14), navigate to the easy-rsa directory and edit
the vars.bat file created in the directory. You may right-click on the file and use “Open with” option to do
so.

Figure 14 : vars.bat file

13
5. Modify with administrator rights the variables in the vars.bat file by inserting your own configuration
settings. These settings will be those used by default to create certification files (see Figure 15
below):

HOME=<OpenVpnPath>\easy-rsa.bat

KEY_SIZE=1024

KEY_COUNTRY =FR
KEY_PROVINCE=RA
KEY_CITY=BREZINS
KEY_EMAIL=admin@localhost.com
KEY_CN = Server
KEY_NAME = FK
KEY_OU= BUAD

Figure 15 : Example settings for Fresenius Kabi in Brézins, France with key size 1024 bit

In the DOS console run the command vars.bat


➢ The initialization of default variables runs.

In the DOS console, run the command clean-all.bat


➢ Clean up of old keys generated in the <OpenVpnPath>\easy-rsa\keys directory starts.

In the DOS console, run the command build-ca.bat (Figure 16)


➢ The authority certificate generation begins.
➢ Confirm the suggested default variables by pressing Enter (as defined earlier in the vars.bat file).

Figure 16 : Generation of ca.crt file

➔ The ca.crt file is generated in the directory <OpenVpnPath>\easy-rsa\keys

Check that the file generated is not empty. If so, please repeat the procedure above and address
potential errors that can occur in the DOS console.

14
Generate the certificate and key for the OpenVPN server
1- In the DOS console as administrator (see previous section), run the command build-key-server.bat server
(Figure 17).
2- Fill in the Common Name field with “server”. Confirm the other fields with their suggested default value.
3- Do not fill in the password (simply hit the Return key).
4- Sign the certificate answering “y” to the question and hit the Return key.
5- Publish (commit) answering “y” to the question and hit the Return key.

Figure 17 : Configuration of certificate and server key

15
➔ The files server.crt and server.key are generated in the directory
<OpenVpnPath>\easy-rsa\keys

Check that the files generated are not empty. If so, please repeat the procedure above and address
potential errors that can occur in the DOS console.

16
Generate certificates and keys for Link+ clients (5 steps per Link+ client)
1. In the DOS console and as an administrator, run the command build-key.bat <name_for_the_client1> (Figure
18).
Note: <name_for_the_client1> is a parameter value to be set depending on the topology in use. See
example below where the value is set to “client1”.

2. Fill in the field Common Name with <name_for_the_client1> and confirm the other fields with their suggested
default value.
3. Do not fill in the password (simply hit the Return key).
4. Sign the certificate answering “y” to the question and hit the Return key.
5. Publish (commit) answering “y” to the question and hit the Return key.

Figure 18 : Configuration of certificate and client key

➔ the files <name_for_the_client1>.crt and <name_for_the_client1>.key are created in the


directory <OpenVpnPath>\easy-rsa\keys

Check that the files generated are not empty. If so, please repeat the procedure above and address
potential errors that can occur in the DOS console.

17
Repeat these steps for a second Link client:

1. In the DOS console, run the command build-key.bat <name_for_the_client2>


Note: similar to <name_for_the_client1>, <name_for_the_client2> is a parameter value to be set
depending on the topology in use.

2. Fill in the field Common Name with <name_for_the_client2> and confirm the other fields with their suggested
default value.
3. Do not fill in the password (simply hit the Return key).
4. Sign the certificate answering “Y” to the question and hit the Return key.
5. Publish (commit) answering “Y” to the question and hit the Return key.

➔ The files <name_for_the_client2>.crt and <name_for_the_client2>.key are created in the


directory <OpenVpnPath>\easy-rsa\keys

Check that the files generated are not empty. If so, please repeat the procedure above and address
potential errors that can occur in the DOS console.

To generate certificates and keys for other Link+ clients, repeat the 5 steps above.

Generate Diffie Hellman parameters for the OpenVPN server


Diffie–Hellman key exchange establishes a shared secret between two parties that can be used for secret
communication for exchanging data over a public network.
1. In the DOS console, run the command build-dh.bat. You will see random characters being displayed in the
window (Figure 19).

Figure 19 : Build-dh.bat

➔ The file dh1024.pem is generated in the directory <OpenVpnPath>\easy-rsa\keys

Check that the file generated is not empty. If so, please repeat the procedure above and address
potential errors that can occur in the DOS console.

18
How to update server and client configuration files
Prerequisites
Copy the following files of the OpenVPN server from <OpenVPNPath>\easy-ra\keys to the destination folder
<OpenVpnPath>\config:
• ca.crt
• server.crt
• server.key
• dh1024.pem

How to create server configuration file “server.oVPN”


A template of the configuration file server.oVPN is automatically generated when OpenVPN is installed under
<OpenVpnPath>\sample-config.

Figure 20 below shows an example of <OpenVpnPath>\sample-config for Windows 7, 64-bit.

1. Copy the file “server.oVPN” in <OpenVpnPath>\config then edit it using your preferred text editor (notepad.exe
can be used).

2. Update the following configuration settings with your own configuration (see highlighted sections in Figure 20):
• IP address (server IP address on which OpenVPN is installed)
• VPN server port (note that this port must be opened in the firewall)
• Authority file path (ca.crt)
• Server certification file path (server.crt)
• Server key file path (server.key)
• Diffie Hellman file path (dh1024.pem)
• Select the type of encoding AES

19
##################################################
# Sample OpenVPN 2.0 config file for #
# multi-client server. #
# #
# This file is for the server side #
# of a many-clients <-> one-server #
# OpenVPN configuration. #
# #
# OpenVPN also supports #
# single-machine <-> single-machine #
# configurations (See the Examples page #
# on the web site for more info). #
# #
# This config should work on Windows #
# or Linux/BSD systems. Remember on #
# Windows to quote pathnames and use #
# double backslashes, e.g.: #
# "C:\\Program Files\\OpenVPN\\config\\foo.key" #
# #
# Comments are preceded with '#' or ';' #
#################################################

# Which local IP address should OpenVPN


# listen on? (optional)
local 192.168.0.2
# Which TCP/UDP port should OpenVPN listen on?
# If you want to run multiple OpenVPN instances
# on the same machine, use a different port
# number for each one. You will need to
# open up this port on your firewall.
port 1194

# TCP or UDP server?


;proto tcp
proto udp

# "dev tun" will create a routed IP tunnel,


# "dev tap" will create an ethernet tunnel.
# Use "dev tap0" if you are ethernet bridging
# and have precreated a tap0 virtual interface
# and bridged it with your ethernet interface.
# If you want to control access policies
# over the VPN, you must create firewall
# rules for the the TUN/TAP interface.
# On non-Windows systems, you can give
# an explicit unit number, such as tun0.
# On Windows, use "dev-node" for this.
# On most systems, the VPN will not function
# unless you partially or fully disable
# the firewall for the TUN/TAP interface.
;dev tap
dev tun

# Windows needs the TAP-Win32 adapter name


# from the Network Connections panel if you
# have more than one. On XP SP2 or higher,
# you may need to selectively disable the
# Windows firewall for the TAP adapter.
# Non-Windows systems usually don't need this.
;dev-node MyTap

# SSL/TLS root certificate (ca), certificate

20
# (cert), and private key (key). Each client
# and the server must have their own cert and
# key file. The server and all clients will
# use the same ca file.
#
# See the "easy-rsa" directory for a series
# of scripts for generating RSA certificates
# and private keys. Remember to use
# a unique Common Name for the server
# and each of the client certificates.
#
# Any X509 key management system can be used.
# OpenVPN can also use a PKCS #12 formatted key file
# (see "pkcs12" directive in man page).
ca "C:\\Program\ Files\ (x86)\\OpenVPN_64bits\\config\\ca.crt"
cert "C:\\Program\ Files\ (x86)\\OpenVPN_64bits\\config\\server.crt"
key "C:\\Program\ Files\ (x86)\\OpenVPN_64bits\\config\\server.key"
# This file should be kept secret

# Diffie hellman parameters.


# Generate your own with:
# openssl dhparam -out dh1024.pem 1024
# Substitute 2048 for 1024 if you are using
# 2048 bit keys.
dh "C:\\Program\ Files\ (x86)\\OpenVPN_64bits\\config\\dh1024.pem"

# Configure server mode and supply a VPN subnet


# for OpenVPN to draw client addresses from.
# The server will take 10.8.0.1 for itself,
# the rest will be made available to clients.
# Each client will be able to reach the server
# on 10.8.0.1. Comment this line out if you are
# ethernet bridging. See the man page for more info.
server 10.8.0.0 255.255.255.0

# Maintain a record of client <-> virtual IP address


# associations in this file. If OpenVPN goes down or
# is restarted, reconnecting clients can be assigned
# the same virtual IP address from the pool that was
# previously assigned.
ifconfig-pool-persist ipp.txt

# Configure server mode for ethernet bridging.


# You must first use your OS's bridging capability
# to bridge the TAP interface with the ethernet
# NIC interface. Then you must manually set the
# IP/netmask on the bridge interface, here we
# assume 10.8.0.4/255.255.255.0. Finally we
# must set aside an IP range in this subnet
# (start=10.8.0.50 end=10.8.0.100) to allocate
# to connecting clients. Leave this line commented
# out unless you are ethernet bridging.
;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100

# Push routes to the client to allow it


# to reach other private subnets behind
# the server. Remember that these
# private subnets will also need
# to know to route the OpenVPN client
# address pool (10.8.0.0/255.255.255.0)
# back to the OpenVPN server.
;push "route 192.168.10.0 255.255.255.0"

21
;push "route 192.168.20.0 255.255.255.0"

# To assign specific IP addresses to specific


# clients or if a connecting client has a private
# subnet behind it that should also have VPN access,
# use the subdirectory "ccd" for client-specific
# configuration files (see man page for more info).

# EXAMPLE: Suppose the client


# having the certificate common name "Thelonious"
# also has a small subnet behind his connecting
# machine, such as 192.168.40.128/255.255.255.248.
# First, uncomment out these lines:
;client-config-dir ccd
;route 192.168.40.128 255.255.255.248
# Then create a file ccd/Thelonious with this line:
# iroute 192.168.40.128 255.255.255.248
# This will allow Thelonious' private subnet to
# access the VPN. This example will only work
# if you are routing, not bridging, i.e. you are
# using "dev tun" and "server" directives.

# EXAMPLE: Suppose you want to give


# Thelonious a fixed VPN IP address of 10.9.0.1.
# First uncomment out these lines:
;client-config-dir ccd
;route 10.9.0.0 255.255.255.252
# Then add this line to ccd/Thelonious:
# ifconfig-push 10.9.0.1 10.9.0.2

# Suppose that you want to enable different


# firewall access policies for different groups
# of clients. There are two methods:
# (1) Run multiple OpenVPN daemons, one for each
# group, and firewall the TUN/TAP interface
# for each group/daemon appropriately.
# (2) (Advanced) Create a script to dynamically
# modify the firewall in response to access
# from different clients. See man
# page for more info on learn-address script.
;learn-address ./script

# If enabled, this directive will configure


# all clients to redirect their default
# network gateway through the VPN, causing
# all IP traffic such as web browsing and
# and DNS lookups to go through the VPN
# (The OpenVPN server machine may need to NAT
# the TUN/TAP interface to the internet in
# order for this to work properly).
# CAVEAT: May break client's network config if
# client's local DHCP server packets get routed
# through the tunnel. Solution: make sure
# client's local DHCP server is reachable via
# a more specific route than the default route
# of 0.0.0.0/0.0.0.0.
;push "redirect-gateway"

# Certain Windows-specific network settings


# can be pushed to clients, such as DNS
# or WINS server addresses. CAVEAT:
# http://openVPN.net/faq.html#dhcpcaveats

22
;push "dhcp-option DNS 10.8.0.1"
;push "dhcp-option WINS 10.8.0.1"

# Uncomment this directive to allow different


# clients to be able to "see" each other.
# By default, clients will only see the server.
# To force clients to only see the server, you
# will also need to appropriately firewall the
# server's TUN/TAP interface.
;client-to-client

# Uncomment this directive if multiple clients


# might connect with the same certificate/key
# files or common names. This is recommended
# only for testing purposes. For production use,
# each client should have its own certificate/key
# pair.
#
# IF YOU HAVE NOT GENERATED INDIVIDUAL
# CERTIFICATE/KEY PAIRS FOR EACH CLIENT
# EACH HAVING ITS OWN UNIQUE "COMMON NAME",
# UNCOMMENT THIS LINE OUT.
;duplicate-cn

# The keep alive directive causes ping-like


# messages to be sent back and forth over
# the link so that each side knows when
# the other side has gone down.
# Ping every 10 seconds, assume that remote
# peer is down if no ping received during
# a 120 second time period.
keepalive 10 120

# For extra security beyond that provided


# by SSL/TLS, create an "HMAC firewall"
# to help block DoS attacks and UDP port flooding.
#
# Generate with:
# openVPN --genkey --secret ta.key
#
# The server and each client must have
# a copy of this key.
# The second parameter should be '0'
# on the server and '1' on the clients.
#tls-auth ta.key 0 # This file is secret

# Select a cryptographic cipher.


# This config item must be copied to
# the client config file as well.
;cipher BF-CBC # Blowfish (default)
cipher AES-128-CBC # AES
;cipher DES-EDE3-CBC # Triple-DES

# Enable compression on the VPN link.


# If you enable it here, you must also
# enable it in the client config file.
comp-lzo

# The maximum number of concurrently connected


# clients we want to allow.
;max-clients 100

23
# It's a good idea to reduce the OpenVPN
# daemon's privileges after initialization.
#
# You can uncomment this out on
# non-Windows systems.
;user nobody
;group nobody

# The persist options will try to avoid


# accessing certain resources on restart
# that may no longer be accessible because
# of the privilege downgrade.
persist-key
persist-tun

# Output a short status file showing


# current connections, truncated
# and rewritten every minute.
status openVPN-status.log

# By default, log messages will go to the syslog (or


# on Windows, if running as a service, they will go to
# the "\Program Files\OpenVPN\log" directory).
# Use log or log-append to override this default.
# "log" will truncate the log file on OpenVPN startup,
# while "log-append" will append to it. Use one
# or the other (but not both).
;log openVPN.log
;log-append openVPN.log

# Set the appropriate level of log


# file verbosity.
#
# 0 is silent, except for fatal errors
# 4 is reasonable for general usage
# 5 and 6 can help to debug connection problems
# 9 is extremely verbose
verb 3

# Silence repeating messages. At most 20


# sequential messages of the same message
# category will be output to the log.
;mute 20
Figure 20 : Example of <OpenVpnPath>\sample-config for Windows 7, 64-bit

➔ The OpenVPN server is configured

Go to the next step §7 “Launching the OpenVPN server”

24
5. How to configure OpenVPN server 2.5.0
Generate the authority certificate for OpenVPN server
Copy with administrator rights the file vars.example in path <OpenVpnPath>\easy-rsa and paste in the same
directory, change the file name of copied file to vars.
Modify with administrator rights the variables in the vars.bat file by inserting your own configuration settings.
These settings will be those used by default to create certification files (see Figure 21 below):

set_var EASYRSA_REQ_COUNTRY "FR"


set_var EASYRSA_REQ_PROVINCE "RA"
set_var EASYRSA_REQ_CITY "BREZINS"
set_var EASYRSA_REQ_ORG "Fresenius"
set_var EASYRSA_REQ_EMAIL "admin@localhost.com"
set_var EASYRSA_REQ_OU "BUAD"
Figure 21 : Settings for Fresenius, Brézins, France
Open a DOS console (cmd.exe) as an administrator.
In the DOS console, run the command cd <OpenVpnPath>\easy-rsa
For example: cd C:\Program Files\OpenVPN\easy-rsa

In the DOS console, run the command EasyRSA-Start.bat

Figure 22 : Run easyrsa-start

25
1. In the DOS console, run the command ./easyrsa init-pki
➢ The PKI folder is created (see Figure 23)

Figure 23 : Create PKI folder


2. In the DOS console, run the command ./easyrsa build-ca nopass
➢ Fill in the Common Name field with nothing by simply hitting the Return key.
➢ The ca.crt is created (see Figure 24)

Figure 24 : Generation of ca.crt file

26
➔ The ca.crt file is generated in the directory <OpenVpnPath>\easy-rsa\pki

Check that the file generated is not empty. If so, please repeat the procedure above and address
potential errors that can occur in the DOS console.

Generate the certificate and key for the OpenVPN server


In the DOS console, run the command ./easyrsa gen-req server nopass (Figure 25).
Fill in the Common Name field with “server” and hit the Return key.

Figure 25 : Generation of server certificate

27
In the DOS console, run the command ./easyrsa sign server server (Figure 26).
Fill in the Confirm request details field with “yes” and hit the Return key.

Figure 26 : Sign the server certificate

➔ The files server.key is generated in the directory <OpenVpnPath>\easy-


rsa\pki\private.
The files server.crt is generated in the directory <OpenVpnPath>\easy-rsa\pki\issued.

Check that the files generated are not empty. If so, please repeat the procedure above and address
potential errors that can occur in the DOS console.

28
Generate the certificates and keys for Link+ OpenVPN clients
In the DOS console, run the command ./easyrsa gen-req client1 nopass (Figure 27).
Fill in the Common Name field with “client1” and hit the Return key.

Figure 27 : Generation of client certificate


In the DOS console, run the command ./easyrsa sign client client1 (Figure 28).
Fill in the Confirm request details field with “yes” and hit the Return key.

29
Figure 28 : Sign the client certificate

➔ The files <name_for_the_client1>.key is generated in the directory <OpenVpnPath>\easy-


rsa\pki\private.
The files <name_for_the_client1>.crt is generated in the directory <OpenVpnPath>\easy-
rsa\pki\issued.

Check that the files generated are not empty. If so, please repeat the procedure above and address
potential errors that can occur in the DOS console.

30
Repeat these steps for a second Link client:

In the DOS console, run the command ./easyrsa gen-req client2 nopass.
Fill in the Common Name field with “client2” and press on « Enter ».
In the DOS console, run the command ./easyrsa sign client client2.
Fill in the Confirm request details field with “yes” and press on « Enter ».

➔ The files <name_for_the_client2>.key is generated in the directory <OpenVpnPath>\easy-


rsa\pki\private.
The files <name_for_the_client2>.crt is generated in the directory <OpenVpnPath>\easy-
rsa\pki\issued.

Check that the files generated are not empty. If so, please repeat the procedure above and address
potential errors that can occur in the DOS console.

To generate certificates and keys for other Link clients, repeat the 4 steps above.

Generate Diffie Hellman parameters for the OpenVPN server


Diffie–Hellman key exchange establishes a shared secret between two parties that can be used for secret
communication for exchanging data over a public network.
In the DOS console, run the command ./easyrsa gen-dh. You will see random characters being displayed in the
window. After a short while, the dh.pem created (Figure 29).

Figure 29 : Build-dh.bat

31
➔ The file dh.pem is generated in the directory <OpenVpnPath>\easy-rsa\pki

Check that the file generated is not empty. If so, please repeat the procedure above and address
potential errors that can occur in the DOS console. If the file is not empty, we can now close the DOS console.

Server and client configuration files


Phase 1: copy the files

Copy the following files of the OpenVPN server from original directory to the folder <OpenVpnPath>\config:
• ca.crt (order by original directory: <OpenVpnPath>\easy-rsa\pki)
• server.crt (order by original directory: <OpenVpnPath>\easy-rsa\pki\issued)
• server.key (order by original directory: <OpenVpnPath>\easy-rsa\pki\private)
• dh.pem (order by original directory: <OpenVpnPath>\easy-rsa\pki)

Phase 2: creating server configuration file “server.oVPN”


A template of the configuration file server.oVPN was automatically generated when OpenVPN was installed
under <OpenVpnPath>\sample-config.

Figure 29 shows an example of <OpenVpnPath>\sample-config for Windows 10, 64-bit.

1. Copy the file “server.oVPN” in <OpenVpnPath>\config then edit it with administrator rights.
2. Update the following configuration settings with your own configuration (see highlighted texts in Figure 30):
• IP address (Server IP address on which is installer OpenVPN)
• VPN server port (this port must be open in the firewall)
• Authority file path (ca.crt)
• Server certification file path (server.crt)
• Server key file path (server.key)
• Diffie Hellman file path (dh.pem)
• Disable the tls-auth ta.key 0
• Select the type of encoding AES
• Enable compatible with older clients

32
Line 25: local 192.168.0.2
Line 32: port 1194
Line 78: ca "C:\\Program\ Files\\OpenVPN\\config\\ca.crt"
Line 79: cert "C:\\Program\ Files\\OpenVPN\\config\\server.crt"
Line 80: key "C:\\Program\ Files\\OpenVPN\\config\\server.key"
Line 85: dh "C:\\Program\ Files\\OpenVPN\\config\\dh.pem"
Line 244: # tls-auth ta.key 0 # This file is secret
Line 252: data-ciphers AES-128-CBC
Line 263: comp-lzo

Figure 30 : Example of <OpenVpnPath>\sample-config for Windows 7, 64-bit

➔ The OpenVPN server is configured

Go to the next step §7 “Launching the OpenVPN server”

33
6. How to configure the OpenVPN server for concurrent usage
How to generate the authority certificate for OpenVPN server
In OpenVPN 2.3.6, edit the file openssl-1.0.0.cnf under <OpenVpnPath>\easy-rsa with administrator rights, and
update line 57 as shown in Figure 31:

default_md = SHA256

Figure 31 : Settings for certificate encryption


Open a DOS console (cmd.exe) with administrator rights.
In the DOS console, run the command cd <OpenVpnPath>\easy-rsa
For example: cd C:\Program Files (x86)\OpenVPN\easy-rsa

In the DOS console, run the command init-config.bat


➢ The configuration file vars.bat.sample is copied for initialization (see Figure 32)

Figure 32 : Initialization file


Through the Windows explorer (Figure 33), edit the vars.bat file created in the easy-rsa directory.

Figure 33 : vars.bat file


Edit with administrator rights the variables in the vars.bat file by inserting your own configuration settings. These
settings will be those used by default to create certification files (see Figure 34 below):

HOME=<OpenVpnPath>\easy-rsa.bat

34
KEY_SIZE=2048
KEY_COUNTRY =FR
KEY_PROVINCE=RA
KEY_CITY=BREZINS
KEY_EMAIL=admin@localhost.com
KEY_CN = Server
KEY_NAME = FK
KEY_OU= BUAD
Figure 34 : Settings for Fresenius, Brézins, France with key size 2048 bit
In the DOS console run the command vars.bat. It will run the initialization of the default variables.
In the DOS console, run the command clean-all.bat. This will clean-up old generated keys in the
<OpenVpnPath>\easy-rsa\keys directory

In the DOS console, run the command build-ca.bat (Figure 35). It will start the authority certificate generation.
Press Enter key to confirm the suggested default variables.

Figure 35 : Generation of ca.crt file

➔ The ca.crt file is generated in the directory <OpenVpnPath>\easy-rsa\keys

Check that the file generated is not empty. If so, please repeat the procedure above and address
potential errors that can occur in the DOS console.

35
How to generate the certificate and key for the OpenVPN server
In OpenVPN 2.3.6, in the DOS console, run the command build-key-server.bat server (Figure 36).
Fill in the Common Name field with “server”. Confirm the other fields with their suggested default value.
Do not fill in the password (Return).
Sign the certificate answering “y” to the question and press on « Enter ».
Publish (commit) answering “y” to the question and press on « Enter ».

Figure 36 : Configuration of certificate and server key

➔ The files server.crt and server.key are generated in the directory


<OpenVpnPath>\easy-rsa\keys

36
Check that the files generated are not empty. If so, please repeat the procedure above and address
potential errors that can occur in the DOS console.

How to generate certificates and keys for Link+ OpenVPN clients

Figure 37 : Configuration of certificate and client key

➔ the files <name_for_the_client1>.crt and <name_for_the_client1>.key are created in the


directory <OpenVpnPath>\easy-rsa\keys

In OpenVPN 2.3.6, in the DOS console, run the command build-key.bat <name_for_the_client1> (Figure 37).
Note: <name_for_the_client1> is chosen by you, for example: client1

37
Fill in the field Common Name with <name_for_the_client1> and confirm the other fields with their suggested
default value.
Do not fill in the password (Return).
Sign the certificate answering “y” to the question and press on « Enter ».
Publish (commit) answering “y” to the question and press on « Enter ».

Please repeat this sequence for each link+ to be configured.

Check that the files generated are not empty. If so, please repeat the procedure above and address
potential errors that can occur in the DOS console.

Repeat these steps for a second Link+ client:

In the DOS console, run the command build-key.bat <name_for_the_client2>


Note: <name_for_the_client2> is chosen by you, for example: client2

Fill in the field Common Name with <name_for_the_client2> and confirm the other fields with their suggested
default value.
Do not fill in the password (Return).
Sign the certificate answering “Y” to the question and press on « Enter ».
Publish (commit) answering “Y” to the question and press on « Enter ».

➔ The files <name_for_the_client2>.crt and <name_for_the_client2>.key are created in the


directory <OpenVpnPath>\easy-rsa\keys

Check that the files generated are not empty. If so, please repeat the procedure above and address
potential errors that can occur in the DOS console.

To generate certificates and keys for other Link clients, please repeat the steps above.

Generate Diffie Hellman parameters for the OpenVPN server


In OpenVPN 2.3.6, in the DOS console, run the command build-dh.bat. Some characters are displayed in the
window (Figure 38).

38
Figure 38 : Build-dh.bat

➔ The file dh2048.pem is generated in the directory <OpenVpnPath>\easy-rsa\keys

Check that the file generated is not empty. If so, please repeat the procedure above and address
potential errors that can occur in the DOS console.

How to configure Server and client files for concurrent use in server 2.3.6

If OpenVPN server 2.5.0 is used simultaneously with Link+ D14/D5 and Link+ D16for D14/D15 Link+
with D16 Link+, go to section 6.6 directly. Proceed as follows otherwise.

Phase 1: Files copy

1. Copy the following files of the OpenVPN server from <OpenVPNPath>\easy-ra\keys to the folder
<OpenVpnPath>\config:
• ca.crt
• server.crt
• server.key
• dh2048.pem

Phase 2: Create server configuration file “server.oVPN”


A template of the configuration file server.oVPN was automatically generated when OpenVPN was installed
under <OpenVpnPath>\sample-config.

Copy the file “server.oVPN” in <OpenVpnPath>\config then edit it with administrator rights.
Adapt the following configuration settings to your configuration (see highlighted texts in Figure 39):
IP address (Server IP address on which is installer OpenVPN)
VPN server port (this port must be open in the firewall)
Authority file path (ca.crt)
Server certification file path (server.crt)
Server key file path (server.key)
Diffie Hellman file path (dh2048.pem)
Select the type of encoding AES

39
Line 25: local 192.168.0.2
Line 32: port 1194
Line 78: ca "C:\\Program\ Files\ (x86)\\OpenVPN\\config\\ca.crt"
Line 79: cert "C:\\Program\ Files\ (x86)\\OpenVPN\\config\\server.crt"
Line 80: key "C:\\Program\ Files\ (x86)\\OpenVPN\\config\\server.key"
Line 85: dh "C:\\Program\ Files\ (x86)\\OpenVPN\\config\\dh2048.pem"
Line 250: cipher AES-128-CBC # AES
Figure 39 : Example of <OpenVpnPath>\sample-config for Windows 7, 64-bit

➔ The OpenVPN server is configured

Go to the next step §7 “Launching the OpenVPN server”

Server and client configuration files for concurrent use in server 2.5.0
Phase 1: Files copy

Copy the following OpenVPN server files which generated by server 2.3.6, to OpenVPN server 2.5.0 installation
directory. The original directory of these files is in server 2.3.6 installation path <OpenVpnPath>\easy-rsa\keys,
the destination directory of those files is in server 2.5.0 installation path <OpenVpnPath>\config.
• ca.crt
• server.crt
• server.key
• dh2048.pem

Phase 2: Create server configuration file “server.oVPN”


A template of the configuration file server.oVPN was automatically generated when OpenVPN 2.5.0 was
installed under <OpenVpnPath>\sample-config.

Copy the file “server.oVPN” in server 2.5.0 installation path <OpenVpnPath>\config then edit it with
administrator rights.
Adapt the following configuration settings to your configuration (see highlighted texts in Figure 40):
IP address (Server IP address on which is installer OpenVPN)
VPN server port (this port must be open in the firewall)
Authority file path (ca.crt)
Server certification file path (server.crt)
Server key file path (server.key)
Diffie Hellman file path (dh2048.pem)
Disable the tls-auth ta.key 0
Select the type of encoding AES
Enable compatible with older clients

Line 25: local 192.168.0.2


Line 32: port 1194
Line 78: ca "C:\\Program\ Files\\OpenVPN\\config\\ca.crt"
Line 79: cert "C:\\Program\ Files\\OpenVPN\\config\\server.crt"
Line 80: key "C:\\Program\ Files\\OpenVPN\\config\\server.key"
Line 85: dh "C:\\Program\ Files\\OpenVPN\\config\\dh2048.pem"
Line 244: # tls-auth ta.key 0 # This file is secret

40
Line 252: data-ciphers AES-128-CBC
Line 263: comp-lzo
Figure 40 : Example of <OpenVpnPath>\sample-config for Windows 7, 64-bit

➔ The OpenVPN server is configured

7. How to launch OpenVPN server


Pre-requisite: The Link+ and the OpenVPN server must be connected to the network.

You can choose to:

• Start the server manually


OR
• To run it as a Windows service (recommended for installation on a server machine)

Running OpenVPN as a service will allow:

a. OpenVPN to be run from a non-administrator account


b. OpenVPN to be started automatically on system startup. This is often preferred on a server machine, as well
as any machines which will be constantly connected to a server.

How to manually start OpenVPN server


Navigate to the folder <OpenVpnPath>\bin and as an administrator, run the file “openVPN-gui.exe”.

Note: please check it the OpenVPN GUI was already auto started by a non-administrator user. If this is the
case, the OpenVPN GUI must be exited, then restarted as administrator. You can use the shortcut added to
the computer desktop during installation (see Figure 41 below):

Figure 41 : Run openVPN-gui.exe

A notification icon opens in the task bar (see Figure 42): click on “Connect”

41
Figure 42 : Connect the OpenVPN server

➔ The OpenVPN server starts up

Go to the next step §7.3 “How to check OpenVPN server”

42
How to launch OpenVPN server as a Windows service
For OpenVPN 2.3.6

Run the Windows Service administrative tool:


a. Press Windows Key + R
b. Type “services.msc” and press Enter

The Services window opens. Select the OpenVPN Service and select “properties” with a right click (See Figure 43)

Figure 43 : Services window

Check “automatic” startup type of the service (See Figure 44) and start the service

43
Figure 44 : OpenVPN service properties window

➔ The OpenVPN server starts up

For OpenVPN 2.5.0

In OpenVPN 2.5.0 it’s not possible to auto start the server with Graphical Interface.

You must copy all the content of the C:\Program Files\OpenVPN\config\ to the C:\Program
Files\OpenVPN\config-auto\ folder.

Following this method, the OpenVPNservice (already set to Automatic with OpenVPN server 2.5.0) will auto
start the server at computer logon but without Graphic Interface, only in service mode.

How to check OpenVPN server status


For OpenVPN2.3.6 with Graphical Interface

In the notification icon in Figure 45, the “Connect” option should be greyed out and “Disconnect” option appear
in black:
a. If this is not the case, please refer to section 7.1 and/or to section 10.
b. If this is the case, proceed with the step below.

Click on “Show status” (see Figure 44).

44
Figure 45 : Show status of OpenVPN server

Check that the server is “Connected” in the Connection OpenVPN (server) window . See Figure 46 as an
example.

Figure 46 : The OpenVPN server is connected

If this is not the case, please refer to section 7.1 and/or to section 11.

Proceed to next section otherwise.

➔ The Open VPN server is connected

45
For OpenVPN 2.5.0 without Graphical Interface

After the computer restart, check that the computer takes the OpenVPN Server IP in a DOS console:

Run “ipconfig” command in DOS console.

Verify the OpenVPN TAP adapter take the first IP of the virtual IP set in server.ovpn (See Example below).

Example: OpenVPN TAP get his 10.8.0.1 first IP with “ ”

set in the server.ovpn

If an IP address is set for the OpenVPN Tap adapter, the server is running.

Note: Be careful, the OpenVPN Graphical Interface will not show OpenVPN Server as Started and you can’t
start it with the GUI in this configuration. It will return an error if you try to connect with GUI Interface.

How to check communication between the OpenVPN server and the Link+ client
Pre-requisite: The Link+ and the OpenVPN server must be connected on the network.

Deactivate the Windows firewall for OpenVPN (at a minimum for the port defined in the server configuration).

Check that the OpenVPN server can ping the connected Link+, and vice versa.

➔ The Link client and the OpenVPN server are properly connected

8. How to configure OpenVPN client

46
Link+ client configuration
Connect to the Link+ Web interface.
Select “Configuration” -> “Data Export” (see Figure 47).

Figure 47 : Export data from Link

➢ Window in Figure 48 is displayed

Figure 48 : Link+ data export configuration

Check “Enabled” for “Serial export protocol Over TCP”.

Note: Check “Enabled” for “Serial export protocol for Agilia SP and VP” if you wish to activate export of data for
Agilia SP and VP pumps.

Then click on “Apply”


➢ The Link+ data export confirmation message shown in Figure 49 is displayed

Figure 49 : Link data export confirmation message

47
Click on “OK”.
Return to the “Configuration” menu in the Link Web interface (see Figure 50).
Select “Network”

Figure 50 : “Network” selection

➢ The Wired Network configuration window as shown in Figure 51 is displayed

Figure 51 : Wired Network configuration window


a) Enter the IP address of the OpenVPN server (defined in the file server.oVPN).
b) Enter the port of the OpenVPN server (defined in the file server.oVPN).

c) Press the “CA certificate” button

d) Select the file ca.crt in the corresponding directory.


The file ca.crt generated by OpenVPN server 2.3.6 is in directory <OpenVpnPath>\easy-rsa\keys.
The file ca.crt generated by OpenVPN server 2.5.0 is in directory <OpenVpnPath>\easy-rsa\pki.
e) Click on “open” to download it.

f) Press the “Client certificate” button.

g) Select the file <name_for_the_client1>.crt in the corresponding directory.

48
The file <name_for_the_client1>.crt generated by OpenVPN server 2.3.6 is in directory
<OpenVpnPath>\easy-rsa\keys.
The file <name_for_the_client1>.crt generated by OpenVPN server 2.5.0 is in directory
<OpenVpnPath>\easy-rsa\pki\issued.
h) Click on “open” to download it.

i) Press the “Client key” button.

j) Select the file <name_for_the_client1>.key in the corresponding directory.


The file <name_for_the_client1>.key generated by OpenVPN server 2.3.6 is in directory
<OpenVpnPath>\easy-rsa\keys.
The file <name_for_the_client1>.key generated by OpenVPN server 2.5.0 is in directory
<OpenVpnPath>\easy-rsa\pki\private.
k) Click on “open” to download it.

➢ The Data export window is completed (Figure 52)

Figure 52 : Configure Wired Network completed window

Before applying the changes, check that the selected files are correct.

1. Press to apply the changes.


➢ The Configure Wired Network window is displayed (Figure 53)

Figure 53 : Confirmation of settings for the Configure Wired Network window

2. Press OK.

49
3. When the network configuration operation is complete, press on

• ➔ The Link+ restarts, the client VPN configuration is now active

50
9. Connection between OpenVPN and Link+ verification
Pre-requisite: Link+ boot is complete.

Serial communication on TCP activation verification


Connect to the Link+ web interface.
Go to “Configuration”.
Then go into “Data Export”.
Check that the “Serial export protocol Over TCP” option is set to “Enabled” (see Figure 54)

Figure 54 : Verification of activation of serial communication on TCP

➔ Serial communication on TCP is active

51
VPN connection configuration verification
Connect to the Link+ web interface.
Go to “Configuration”.
Go to “Network”.
In the field “VPN Client address” check that there is a new IP address (see Figure 55): this is the virtual address
for Link defined and used by OpenVPN:
a. If this is not the case, go back to section 8.1 and/or refer to section10.
b. If this is the case, go on to the step below.

Figure 55 : Location of virtual address for Link


Note: The Link virtual IP address is given by the DHCP of the OpenVPN server. The very first client connected
to the OpenVPN server is getting the 10.8.0.4 virtual IP address.

➔ The Link has a virtual address for VPN

➔ The Link and the Open VPN server are connected, your
data are protected.

If this is not the case, go back to section 9 and/or refer to section 10.

52
10. Troubleshooting
Sections 4 and 5
Make sure that any error encountered during OpenVPN server configuration are resolved before continuing with
the configuration procedure. In addition, check the size of the generated files during these steps. They must be
different from 0 kb. If this issue occurs, please restart the procedure and address errors appearing in the DOS
console.

Section 7.3, in case of Open VPN connection failure


Make sure that the OpenVPN server was started with administrator rights.
Check that the network interface is active and configured with the IP address as defined in the configuration file
“server.oVPN”.
Check the pathnames format in the server.oVPN file: the use of doubled backslashes is mandatory for Windows
pathnames, e.g.: "C:\\Program\\Files\\OpenVPN\\config\\foo.key"
Open the log file for further information about the cause of the error. For instance, it could be due to incorrect
configuration with a wrong file path entered in the file “server.oVPN”.

Section 9.2, in case of IP address issue


Check the physical connection (cables properly connected, successful ping between physical addresses, etc).
Use he Link+ web interface: Menu “Configuration” → “Time” to check that the Link+ and OpenVPN server
configuration dates and times are identical. This is mandatory to establish server/client authentication.
Check the Open VPN server server configuration (see file “server.oVPN”).
Check the Open VPN client configuration on the Link+ (via the web interface: physical address of the machine
where OpenVPN server, VPN port, files .crt and .key are installed).
Check that the firewall or antivirus software is not blocking the port configured for the OpenVPN software.
Check that you do not reach the maximum allowed client defined by your subnet network. Example for the subnet
10.8.0.x, the OpenVPN is potentially able to manage up to 251 Link. If you need more clients, select another
subnet class and adapt the OpenVPN server configuration file in consequence (yellow highlighted line in
server.oVPN, see Figure 56 below). Certificates previously generated are still compatible with the new subnet
chosen.

Figure 56 : VPN Subnet change in server.oVPN

53
If there is still an issue, perform again the configuration of both Open VPN client and server, including certificates
and VPN keys generation.

Link+ and OpenVPN server cannot communicate


Run “route print” command in DOS console. You must have a route defined between Link+ and the OpenVPN
server. If not (this can occur if OpenVPN server is not launched with administrator privileges), you must add the
necessary route.
As an example, "route add -p 10.8.0.0 mask 255.255.255.0 10.8.0.2» configures the route to the VPN subnet
10.8.0.0, the gateway being 10.8.0.2.

11. Best practices


Time configuration
OpenVPN requires time synchronization between the client and the server. Therefore, when using the Ethernet
data export through the VPN, it is highly mandatory to use the time server synchronization on the Link+ web
interface (NTP + Time zone). Do not use manual mode configuration. Please refer to the Link+ Technical Manual
for details on how to configure the NTP server.

Static virtual IP address


Static virtual IP address for each VPN client may be needed. If yes, “ipp.txt” file in <OpenVpnPath>\config can
be used to “choose” the couple [virtual IP address] and [common name] client.

Example of “ipp.txt” file:

The ipp.txt file shall mention the client common name and the
wanted virtual IP network address.

<name_for_the_client1>,10.10.0.4 The <name_for_the_client1> will get the virtual IP address


<name_for_the_client2>,10.10.0.8 10.10.0.4 (network address) + 2 => 10.10.0.6.
<name_for_the_client3>,10.10.0.164
<name_for_the_client4>,10.10.0.252 If a new client, which was not registered in the “ipp.txt” file,
connects to the server, it will obtain an automatic available
virtual IP address.

In server.oVPN file, the default configuration is “ifconfig-pool-persist ipp.txt”

ifconfig-pool-persist file [seconds]: Persist ifconfig-pool data to file, at seconds intervals (default=600), as
well as on program startup and shutdown.

The goal of this option is to provide a long-term association between clients (denoted by their common name)
and the virtual IP address assigned to them from the ifconfig-pool. Maintaining a long-term association is good
for clients because it allows them to effectively use the persist-tun option (the persist-tun option is used to
ensure that the connection comes back up automatically if the underlying network is disrupted.).

file is a comma-delimited ASCII file, formatted as


“<name_for_the_client1>,<virtual_network_address_for_client1>”.

If seconds = 0, file will be treated as read-only. This is useful if you would like to treat file as a configuration
file.

54
server.oVPN configuration example:

# Maintain a record of client <-> virtual IP


address
# associations in this file. If OpenVPN goes
down or
# is restarted, reconnecting clients can be
assigned
# the same virtual IP address from the pool that
was
# previously assigned.
ifconfig-pool-persist ipp.txt 0

Note that the entries in this file are treated by OpenVPN as suggestions only, based on past associations
between a common name and IP address. They do not guarantee that the given common name will always
receive the given IP address. Use ifconfig-push (For more details, please refer to the HowTo guide of the
OpenVPN server: https://openVPN.net/index.php/open-source/documentation/howto.html) to guarantee the
assignments.

In case of OpenVPN server crash or unclean shutdown, you potentially lose the persistence of the
ipp.txt file which was not saved. Therefore, the client can get a different virtual IP address than before.

Note: OpenVPN server is configured by default in net30 topology mode. The OpenVPN server assigns a /30
subnet for each client that connects. The first available /30 subnet (after the one the server is using) is:

• 10.10.0.4/30
• 10.10.0.4 -- Network address
• 10.10.0.5 -- Virtual IP address in the OpenVPN Server
• 10.10.0.6 -- Virtual IP address assigned to the client
• 10.10.0.7 -- Broadcast address.
Therefore, one client will use 4 IP addresses in the network for the net30 topology. This should be considered
when configuring the OpenVPN network.

55
-End of Document-

CC10206-4_VPN installation and configuration

Fresenius Kabi AG
Else-Kröner-Str. 1
61352 Bad Homburg - GERMANY
Tel.: +49 (0) 6172 / 686-
www.fresenius-kabi.com

You might also like