Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an ssh tunnel from my home router (R) to a VPN (A). Can I setup another tunnel from another VPN (B) to my home router (R) in a way that traffic from VPN A to VPN B will be tunneled? I'm looking for the following A <-> R <-> B.

My final goal is to have a direct port to port connection between the two IPs.

Is it possible? Can you give me some tips on how to do it?


share|improve this question

migrated from May 19 '13 at 17:17

This question came from our site for system and network administrators.

Should be possible, do you want to forward all data from A->R->B without prejudice? Should be able to create a rule for this after the tunnel is established. Is this a stock router, or something like DDWRT? – David Houde May 19 '13 at 11:17
Yes, without prejudice both ways. I have a weak version of DDWRT but it has port forwarding. What IPs do I specify in the port forwarding rule? External VPN IPs? They're shared between the whole networks. – Vladimir May 19 '13 at 11:37

Yup, indeed you can, and this is one of the things a router is for (routing traffic between different networks).

If the VPN on the other end isn't set up to let you route your own subnets (most aren't, but there is a feature for it; setting it up is a little complex), you may have to do NAT between the different VPN networks so all the hosts appear to be your router when traffic goes over the VPN.

share|improve this answer
In my situation, I have no way of configuring the VPN networks. I have control only over my router but I don't see what the steps would be to make it work. 1st thing I have to open the tunnel between A and R and also B and R. Say I open it on port 443. What do I have to do on the router to make it work? – Vladimir May 19 '13 at 19:56
I mean I can't just put VPN's external IPs and the ports to forward. This won't work right? – Vladimir May 19 '13 at 21:23
Indeed it won't. There is no mechanism for that. – Falcon Momot May 21 '13 at 21:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .