Setting up routing

If you set up a routed VPN, i.e., one where local and remote subnets differ, you need to set up routing between the subnets so that packets will transit the VPN.

Here is a possible road warrior network configuration:

Road Warrior (Windows)

    TAP-Windows Adapter subnet

ifconfig option in OpenVPN config:


Main Office, server (any OS)

    tap adapter subnet

ifconfig option in OpenVPN config:

    private ethernet subnet

The road warrior needs this route in order to reach machines on the main office subnet:

    route add mask (this is a shell command)

Routes can be conveniently specified in the OpenVPN config file itself using the --route option:


If the OpenVPN server in the main office is also the gateway for machines on the remote subnet, no special route is required on the main office side.

On the other hand, if the main office OpenVPN server is NOT also the gateway, then whatever machine or router, which IS the gateway, must know to route subnet to the machine which is running OpenVPN.