www.thorko.de Thorsten Kohlhepp - Systems administrator | OpenVPN with certificates

 

Setup OpenVPN using certificates

apt-get install openvpn

setup the server

#> cp /usr/share/doc/openvpn/examples/sample-config-files/server.conf /etc/openvpn/
#> cp -r /usr/share/doc/openvpn/examples/easy-rsa/2.0 /etc/openvpn/scripts
#> cd /etc/openvpn/scripts

edit vars

#> vi vars

build certs

#> ./clean_all
#> ./build_ca
#> ./build-key-server server

build certs for clients

#> ./build-key client1
#> ./build-key client2

Generate diffie Hellman parameters

#> ./build-dh

edit server.conf file

#> vi /etc/openvpn/server.conf

open firewall on port 1194/udp

Setup client on Windows

Download the client for Windows on OpenVPN.org. Once you have installed it copy your client certificate and key file to your Windows client.
Create an openvpn profile file (see example config file) and import it.

openvpn local file

openvpn import

openvpn name profile