What's new

Howto Tunnel Specific Dst IP

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

wiz561

Occasional Visitor
Hi!

I'm trying to setup merlin to route traffic over the VPN if the destination IP matches. I followed the instructions located here...

http://serverfault.com/questions/38...-hosts-route-through-openvpn-client-on-tomato

-specifically-

1) Created openvpn configs...was able to successfully connect to the vpn server and route all traffic over it.
2a) Uncheck "Create NAT on Tunnel" In VPN Tunneling/Client/Advanced
2b) Uncheck "Redirect Internet Traffic"
2c) added "route-nopull" to the "custom configuration" section.
3) In the shell, executed the following

~~
iptables -I FORWARD -i br0 -o tun11 -j ACCEPT
iptables -I FORWARD -i tun11 -o br0 -j ACCEPT
iptables -I INPUT -i tun11 -j REJECT
iptables -t nat -A POSTROUTING -o tun11 -j MASQUERADE
~~

4) In the shell, executed the following...

~~
ip route flush table 200
ip route flush cache
ip rule add from 192.168.1.11 lookup 200
VPN_GW=`ifconfig tun11 | awk '/inet addr/ {split ($2,A,":"); print A[2]}'`
ip route add table 200 default via $VPN_GW dev tun11
~~

I replaced 192.168.1.11 with my destination IP I wanted to route over the vpn link.

Unfortunately, it just times out when trying to access the URL with a web browser. Traceroute just dies on the first hop.

It seems easy enough, but I was hoping somebody can suggest what I'm doing wrong with this.

Thanks!
 
ignore

Please ignore this message. I did something stupid and posted before I read the forum. Figured out that if I would have spent the time to read the forum, I would have seen another thread related to getting this working.


Thanks!
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top