Simple Example
This example demonstrates a bare-bones point-to-point OpenVPN configuration. A VPN tunnel will be created with a server endpoint of 10.8.0.1 and a client endpoint of 10.8.0.2. Encrypted communication between client and server will occur over UDP port 1194, the default OpenVPN port.
Generate a static key:
openvpn --genkey --secret static.key
Copy the static key to both client and server, over a pre-existing secure channel.
Server configuration file
dev tun
ifconfig 10.8.0.1 10.8.0.2
secret static.key
Client configuration file
remote myremote.mydomain
dev tun
ifconfig 10.8.0.2 10.8.0.1
secret static.key