Bypass openvpn for particular ip

My desktop machine runs Trisquel GNU/Linux 6.0 (which is basically a libre version of Ubuntu 12.04), and I use OpenVPN to connect to a commercial VPN provider for internet access.

It currently routes all my traffic through the VPN, which is great, but I'm looking for a way to allow requests to one specific IP address to bypass the VPN. I'm sure there's a way but repeated web searching hasn't yet turned up anything (best I could find were instructions for doing this on the Cisco VPN client for Windows).

Can you help?

Thanks.


ip route add to $network/$mask via $gateway


Simply add a route for that IP to your local gateway.

You can do this in your openvpn client config like this.

route 10.99.77.55 255.255.255.255 net_gateway

In the config net_gateway is automatically replaced with the correct address.