Routing
As stated before, the main use case for point-to-point style networks is to connect two remote networks over a secure tunnel. In the previous example, the secure tunnel was established, but no network routes were added.
For the next example, consider the following network layout:
The client-side network 192.168.4.0/24 (with netmask 255.255.255.0) needs to be routed over the VPN tunnel to the server.
On the listening end (server), we start:
[root@server] # openvpn \ --ifconfig 10.200.0.1 10.200.0.2 \ --dev tun \ --secret secret.key 0\ --route 192.168.4.0 255.255.255.0 \ --daemon --log /var/log/movpn-02-server.log
On the client side, the code is as follows:
[root@client] # openvpn \ --ifconfig 10.200.0.2 10.200.0.1 \ --dev tun \ --secret secret.key 1\ --remote openvpnserver.example.com \ --daemon --log /var/log/movpn-02-client.log
On the server side, a route statement was added to tell OpenVPN that the network 192.168.4.0/24 is found at the other...