OpenVPN: route specific traffic via VPN


I have …

  • A home network with a static (public) address
  • OpenVPN Server
  • A VPN road warrior client

I use the VPN only for connecting to my home network, all other traffic is not routing over the VPN server. To avoid performance issues the redirect gateway function is not enabled.

Now I have a problem with an cloud service which only allows the access from the static IP address of my home network. When I’m not at home and try to connect to this cloud service the access will denied also if I’m connected to my home network over the VPN.

So I need a solution how I can route the traffic for the cloud service via VPN and the normal traffic not.


add a “route” in your openvpn client.

when the ip address (range) from your cloud service is static, then you can add this command in your client ovpn config file.

Thank you @anton, it works.