Page 1 of 1

Routing Traffic around OPENVPN

Posted: Fri May 23, 2014 8:00 pm
by dlalias2k1
I'm connecting my machine to a remote openvpn server. The connection is established and the server (which I don't have control over) routes all traffic over the tunnel.


I'd like to exclude some traffic to not travel over the tunnel. In my research, it seems like people have accomplished this with iptables rules.


Here's what I've cobbled together from other resources but yet it doesn't seem to be working as expected.


Here's my list of Ip related commands I'm currently testing:
#$ Ran once: echo "10 custom_table" >> /etc/iproute2/rt_tables

ip route add default table custom_table via 192.168.1.1
ip rule add fwmark 0x1 table custom_table
ip route flush cache​
iptables -t mangle -I PREROUTING -p tcp -m multiport --dport 80,443 -j MARK --set-mark 0x1




testing by:
curl ifconfig.me
Returns the ip that is the same as traceroute, which is over the tunnel.


I think I'm missing something simple. I'm inexperienced at iptables, so any assistance would be appreciated.
I'd like Https, HTPS, SSH to route over the unencrypted route.


Thanks!

Re: Routing Traffic around OPENVPN

Posted: Tue May 27, 2014 3:04 am
by rainbow6
You need to talk to your vpn provider as the routing is push by the server.