OpenWrt Forum Archive

Topic: Route traffic through VPN tunnel

The content of this topic has been archived on 28 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello all,
I am running Kamikaze 8.0.9.1 on Asus 500gP. I've established a VPN tunnel using OpenVPN. The tunnel is on interface tap0. OpenVPN pushes a route for the accessing the VPN. I can access the VPN from the router. I've tried to add iptables rules to let my LAN access the VPN but I've been unsuccessful. I've tried to follow the PPTP howto from the old wiki. Ha anyone attempted this and succeded?
Thank you

Do you have something like this?

iptables -A FORWARD -i br-lan -o tap0 -j ACCEPT

Does 'iptables -L FORWARD -v' show any hits?

Another thing to check- does the other end of the tunnel have a route back to your LAN (192.168.1.0/24 by default)?

Hope this helps,
Charlie

Yeah, I had that rule.
There's no way the other end of the tunnel could have a route to my LAN.
It's a tunnel to the 1.0.0.0 network, the so-called anonet. I was using to test VPN, I am thinking of subscribing to a paid VPN service.

If the far end can't route to your LAN, then you'll need to SNAT outbound traffic to the tunnel address-

iptables -t nat -A POSTROUTING -o tap0 -j MASQUERADE

Cheers,
Charlie

The discussion might have continued from here.