Ubuntu – OpenVPN: Only route a specific IP addresses through VPN

centos7openvpnroutingUbuntu

I have installed OpenVPN with certificates using this tutorial: https://www.digitalocean.com/community/tutorials/how-to-setup-and-configure-an-openvpn-server-on-centos-7 and i use static ip adress with ccd directory.

How can I configure the OpenVPN client to ONLY route traffic through the VPN that is destined for a single, specific IP address?

Example:

The server is CentOS 7 and the client is Ubuntu

Best Answer

Add to the server config:

push route 10.8.0.x 255.255.255.255
Related Topic