Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I would like to setup an OpenVPN server with port forwarding on my VPS, because I can not forward ports in my home router.

The general question is, if it is even possible to bypass router port forwarding with a VPN connection?

share|improve this question
1  
Can you add a simple description of the network layout and what you are intending to do? What prevents you from forwarding ports on the router directly? –  peterph Sep 27 '13 at 17:39
    
Notebook => Router => VPN1 => VPN2. Now i would like to forward a Port from VPN2 to my Notebook, without forwarding them on Router or VPN1. The question was, is this even possible? –  Pa Ddy Sep 27 '13 at 20:02

1 Answer 1

If I understand it correctly, you want to create a VPN from your notebook to a server somewhere "out there", and forward a port from the server to the notebook. That should be possible, provided the routing in the VPN is set up correctly, namely the server being able to reach the notebook. Any router restrictions are removed by using the VPN, which encapsulates any data flowing through it.

You can also achieve this with the port forwarding facility in SSH:

ssh -R port-srv:localhost:port-ntb user@srv

This instructs the ssh client to connect to server srv as user user, listen there on port port-srv and forward all incoming traffic to the port port-ntb on localhost (from the ssh client's point of view), which is the notebook. You can also forward the traffic to a third computer by replacing localhost with something else.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.