OpenVPN is a full SSL VPN solution that allows you to connect two networks at layer 2 or 3 via a TCP or UDP tunnel. It is available on https://openvpn.net/ or via your distributions package repositories.
OpenVPN offers a number of options for authentication. We're going to set up a simple configuration, which will get you up and running. From there, there are multiple options, which you may want to consider for your needs.
Install OpenVPN on the server with
sudo apt-get install openvpn
for Debian derivatives like Ubuntu, orsudo yum install openvpn
.Generate a static key:
openvpn --genkey --secret /etc/openvpn/static.key
Set up the server configuration. You can see examples in /
usr/share/doc/openvpn/examples/sample-config-files
. For our purpose, we'll start with the following:proto udp user nobody secret /etc/openvpn/static.key ifconfig 10.8.0.1 10.8.0.2 comp-lzo verb 3
Create a client configuration file:
remote wanaddress proto udp dev tun secret /path/to/static.key...