You can route specific subnet via OpenVPN and the rest of the traffic will be routed to the default PC gateway.
Note: this is valid on OpenVPN installations on Linux that have been installed using this installation script: https://github.com/angristan/openvpn-install
Open OpenVPN server.conf file:
Remove or comment out the following lines:
push "dhcp-option DNS 184.108.40.206" push "dhcp-option DNS 220.127.116.11" push "redirect-gateway def1 bypass-dhcp"
Add the following line where 10.0.0.0 is the network that we need to route via OpenVPN.
push "route 10.0.0.0 255.0.0.0"
Save the file and restart using the following command:
sudo systemctl restart firstname.lastname@example.org