markglh Hi all, I currently have a (tomato) router configured as an openvpn client connecting to a remote vpn server. As things stand i think everything that goes through the router is sent via the vpn, just as it does when running openvpn on my pc. However what i'd like to happen is for only traffic on specific ports to be sent through the vpn, so for example p2p traffic, etc. Is it possible to configure an openvpn client this way? Sorry if this is a stupid question i'm pretty new to this. Thanks, Mark.
janjust on the tomato router you can use iptables to forward traffic to specific interface. this has little to do with openvpn however, and more with LARTC: http://lartc.org
markglh thanks for the reply. I'm confused as to how I'd use that to only route certain ports through the vpn client? Maybe i've misunderstood something? :/ Thanks, Mark.
janjust if the tomato router is the default router for your network then all traffic will pass through the tomato box; at that point you can use iptables (and iproute2) rules to determine which traffic should be forwarded out the tun0 port (i.e. via the VPN) and which traffic via the eth0 port (i.e. via "regular" internet). This is not openvpn specific, but linux/routing specific, hence my referral the the LARTC pages. if the openvpn server pushes out "redirect-gateway" to the openvpn client then this can be overruled using '--route-nopull' in openvpn 2.1.
markglh Ah that makes more sense, hopefully I'll be able to figure the rest out now 🙂 I really appreciate your help on this, sorry if this wasn't the correct place to post this I'm fairly new to tomato/open vpn so I wasn't sure which way to go. Thanks again, Mark.
ethaniel Solved: http://www.linksysinfo.org/index.php?threads/route-only-specific-ports-through-vpn-openvpn.37240/#post-181505