Road warrior setup: OpenVPN routed LANs and other examples

PKI configuration for the following examples is the same (description of cacert.pem, server.key, server.pem, client.key, client.pem, dh.pem. ta.key can be found here), so I will just list the relevant connection stuff.

All this can be done with one OpenVPN instance. However, it is way easier to have a dedicated OpenVPN instance per usecase, to avoid overly complex routing configurations. So use a tun per setup: tun0 for your road warriors, tun1 for your routed LANs. Also: assign separate IP ranges to those tunnel devices.

Examples are based on router with public IP 1.2.3.4, local IP 192.168.2.1 with port 443 forwarded to the OpenVPN server on 192.168.2.3, port 1194. Tunnels will be operating on IP ranges 172.16.0.0/16.

Continue reading