Routing - subnets on both sides
This recipe will demonstrate how to set up server-side and client-side routing in client/server mode. With this setup, the OpenVPN client will be able to reach all the machines behind the OpenVPN server, and the server will be able to reach all the machines behind the client.
Getting ready
This recipe uses the PKI files created in the first recipe of this chapter. Install OpenVPN 2.3.9 or higher on two computers. Make sure the computers are connected over a network. For this recipe, the server computer was running CentOS 6 Linux and OpenVPN 2.3.9 and the client was running Fedora 20 Linux and OpenVPN 2.3.9. Keep the server configuration file, basic-udp-server.conf
, handy along with the client configuration file, basic-udp-client.conf
, from the Server-side routing recipe.
We use the following network layout:
How to do it...
Modify the server configuration file,Â
basic-udp-server.conf
, by adding these lines:client-config-dir /etc/openvpn/cookbook/clients ...