Router bridge issue with OpenVPN client

Pada

Executive Member
Joined
Feb 18, 2009
Messages
8,191
Reaction score
6
Location
Stellenbosch
[SOLVED] Router bridge issue with OpenVPN client

Hi,

I'm having trouble setting up the NAT/Bridging on my Linksys WRT54GL router, running DD-WRT VPN firmware. Basically I want my router to connect to the OpenVPN server, instead of having a few PC's behind the router connecting to the OpenVPN server separately.

I've already managed to get my router open the VPN connection (as a client, using tap0 interface) successfully. I can ping both clients on the other side of the VPN and this side when I'm in a terminal session on the router.
Now my problem is to get the PC's behind the router to connect through the VPN.

As soon as I bridge the tap0 interface (by running brctl addif br0 tap0) with the existing bridge, I cannot access the nodes on the server side of the VPN. I've tried setting up the forwarding, but I had no success with:
Code:
iptables -I FORWARD -i tap0 -o br0 -j ACCEPT
iptables -I FORWARD -i br0 -o tap0 -j ACCEPT

I have no idea on how to setup the NAT/PREROUTING/MASQ stuff. My guess is I'm just missing some NAT configuration here, instead of bridging? Or both.

If you need more detail of how my routing table/network layout looks, or any other relevant detail that I didn't post here, please ask. I've previously had a Linksys WRT54GL running the OpenVPN server (see http://www.dd-wrt.com/phpBB2/viewtopic.php?p=346687#352078), but now I want one to be a client connecting to that same setup.

Help would be appreciated very much.

Regards
Chris
 
Last edited:
what are the pc using for their gateway? WRT54GL router?

is client to client enabled in the openvpn server conf???
 
Last edited:
Well, currently it's a Windows XP machine that I'm using for the VPN server, where I've bridged the VPN interface with the LAN interface. client-to-client is indeed enabled, but that won't have any effect on my situation.

The thing is, I currently have like 5 network interfaces open on my PC, and I would like to let the router do that for me.

I'm gonna try something like "iptables -t nat -I POSTROUTING -o tap0 -j MASQUERADE" later on today and see if that doesn't solve my problem.
 
Haha, I can't believe it, the "iptables -t nat -I POSTROUTING -o tap0 -j MASQUERADE" command was all I needed -> no bridging of the tap0 adapter required.
 
Top
Sign up to the MyBroadband newsletter
X