Wednesday, July 21, 2010

OpenVPN - Linux Client

How-to connect a Linux server to another Linux server via OpenVPN, command line style.

apt-get install openvpn

Copy the example client.conf file

cp /usr/share/doc/openvpn/examples/sample-config-files/client.conf /etc/openvpn

I then edited the client.conf file down as listed below for my initial testing.  Please be sure to adjust according to your own Server configuration as well as proper names for the ca, key and crt files.


#---- OpenVPN Client.conf --------------
dev tap0
proto tcp
resolv-retry infinite
nobind
persist-key
persist-tun
remote hostname.com 1194
ca ca.crt 
cert hostname.crt
key hostname.key
verb 3
 
Restart OpenVPN

/etc/init.d/openvpn start
Test by pinging or logging into the remote server

No comments: