Site Tools


linux:ubuntu:openvpn

This is an old revision of the document!


OpenVPN Server

You can find a similar documentation to install and configure almost everywhere. This guide is for a connection between my Icingaserver and my QNAP, which I wanted to monitor. I dont configure this VPN for browsing the web or anything.

Installation

apt-get install openvpn easy-rsa

Configuration

Create your configuration

gunzip -c /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz > /etc/openvpn/server.conf

Edit the following in “/etc/openvpn/server.conf

#from
dh dh1024.pem
#to
dh dh2048.pem

Edit and uncomment

user nobody
group nogroup

Create the Certificate Authority

cp -r /usr/share/easy-rsa/ /etc/openvpn
mkdir /etc/openvpn/easy-rsa/keys

Edit the default vars in ”/etc/openvpn/easy-rsa/vars“

export KEY_COUNTRY="YOUR COUNTRY eg. DE"
export KEY_PROVINCE="YOUR PROVINCE eg. BW"
export KEY_CITY="YOUR CITY eg. Karlsruhe"
export KEY_ORG="YOUR ORG eg. Lunetikk"
export KEY_EMAIL="YOUR MAILADDRESS"
export KEY_OU="YOUR OU eg. lunetikk"

export KEY_NAME="ANY IDENTIFIER eg. openvpn"

Execute the following and if asked say “y” and enter

openssl dhparam -out /etc/openvpn/dh2048.pem 2048

cd /etc/openvpn/easy-rsa
. ./vars
./clean-all
./build-ca

Build the cert

./build-key-server openvpn







linux/ubuntu/openvpn.1519147282.txt.gz · Last modified: 2018/02/20 18:21 by lunetikk