The complete setup

Based on the previous examples, we can now construct a complete production-level setup using configuration files, including routing, logging, IPv6 support, as well as a few other production features that OpenVPN offers.

Consider the following network layout:

The complete setup

For the server, we create the following configuration file movpn-02-02-server.conf:

dev tun proto udp local openvpnserver.example.com lport 1234 remote openvpnclient.example.com rport 4321 secret secret.key 0 ifconfig 10.200.0.1 10.200.0.2 route 192.168.4.0 255.255.255.0 tun-ipv6 ifconfig-ipv6 2001:610:120::200:0:1 2001:610:120::200:0:2 user nobody groupnobody # use 'group nogroup' ...

Get Mastering OpenVPN now with O’Reilly online learning.

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