I have established VPN using OpenVPN. Ubuntu 14.04

Now, I want to forward through VPN only specific traffic, based on destination IP range (i.e -

Should I use iptables for that?

1 Answer 1



You should only advertise routes to that IP range via the VPN. This is part of the VPN server setup and you should of covered it when setting up the VPN.

[https://community.openvpn.net/openvpn/wiki/RoutedLans] shows how you'd add the routes for some lans behind the VPN.

Like so:


Also make sure you don't have


As this causes all traffic to try and route over your VPN.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.