TESTED WORKING Debian 8.5.0

First update Debain

apt-get update

apt-get upgrade


Next install openvpn software

apt-get install openvpn


Now create a static key

openvpn –genkey –secret /etc/openvpn/static.key


Now create a server .conf

nano /etc/openvpn/server.conf

Input the following.

dev tun
port 42000
ifconfig 10.0.8.1 10.0.8.2

cipher AES-128-CBC
comp-lzo

secret /etc/openvpn/static.key

user nobody
group nogroup

# routes
route 10.0.8.0 255.255.255.0
route 192.168.1.0 255.255.255.0

–Change the above port to the one that you want to use. –

–Change the above ifconfig to the ip scheme that you would like to use keep in mind that .1 is the server in this –

–case and the .2 is the client this is a 1 server + 1 client setup.–

–Make suer to update the routes. the 10.0.8.0 should be updated to reflect the above change. The 192.168.1.0 should match your internal network config. –


For testing launch the server using the following command.

openvpn –config /etc/openvpn/server.conf


Auto open ports at boot time.

Open the following file and add the below line.

nano /etc/rc.local

/usr/local/bin/start.sh

Create the following file.

nano /usr/local/bin/start.sh

Make it executable

chmod +x start.sh