O'Reilly logo

OpenVPN: Building and Integrating Virtual Private Networks by Markus Feilner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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:

debian01:/etc/openvpn# openvpn --remote <IP of System B> --dev tun1 --ifconfig 10.3.0.1 10
Using OpenVPN at the Command Line openvpn command line toolusage.3.0.2 --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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required