Using OpenVPN at the command line

In the course of this book we have already invoked openvpn several times from a command line. As a first example, we built a tunnel with a pre-shared key and a rather simple configuration file. Even though there are some other parameters set in the standard configuration file we used, the easiest command to start a tunnel with a static key is:

vpnserver:/etc/openvpn# openvpn --remote <IP of System B> --dev tun1 --ifconfig --secret /etc/openvpn/key.txt

You see, it's very easy to connect two systems with an openvpn tunnel, when we know their IPs. All we need is a pre-shared key, a tunnel IP, and a decision on which device type to use.

If the second tunnel endpoint is a Linux system already provided ...

Get Beginning OpenVPN 2.0.9 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.