Connect to server using a configuration file
sudo openvpn path/to/client.confTry to set up an insecure peer-to-peer tunnel on bob.example.com host
sudo openvpn --remote alice.example.com --dev tun1 --ifconfig 10.4.0.1 10.4.0.2Connect to the awaiting bob.example.com host without encryption
sudo openvpn --remote bob.example.com --dev tun1 --ifconfig 10.4.0.2 10.4.0.1Create a cryptographic key and save it to file
openvpn --genkey secret path/to/keyTry to set up a peer-to-peer tunnel on bob.example.com host with a static key
sudo openvpn --remote alice.example.com --dev tun1 --ifconfig 10.4.0.1 10.4.0.2 --secret path/to/keyConnect to the awaiting bob.example.com host with the same static key as on bob.example.com
sudo openvpn --remote bob.example.com --dev tun1 --ifconfig 10.4.0.2 10.4.0.1 --secret path/to/key