Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Complex port forwarding problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Gunnay
n00b
n00b


Joined: 09 Jun 2011
Posts: 4

PostPosted: Thu Jun 09, 2011 9:08 pm    Post subject: Complex port forwarding problem Reply with quote

Hello,

A friend and I have a problem concerning port forwarding.

His Windows computer is connected to the internet through a VPN and a proxy. What we intend to do is redirect some connections to specific services (games) on a single opened port, then through my own computer and then to the game server.
Here is a diagram to represent data flows.

http://img200.imageshack.us/img200/797/dessin1p.jpg

Is it possible to do this? If it is, can you suggest us some programs or things to consider for programming to build this architecture.

Thanks for your attention.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2183
Location: Kentucky

PostPosted: Fri Jun 10, 2011 1:52 am    Post subject: Reply with quote

Why doesn't he just ssh thru both his firewall and proxy and connect directly to your machine, mapping the desired port in the process?
Code:

ssh -L <port#>:game.server.com:<port#> hisuname@your.server.com

This command should connect him to your machine, and map his port <port#> to that same port number on the game server. Wouldn't this do the trick?
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 16008

PostPosted: Fri Jun 10, 2011 3:15 am    Post subject: Reply with quote

Moriah wrote:
Wouldn't this do the trick?
If the game is based on UDP, then no. As far as I can tell, ssh can only forward TCP ports via -L/-R. An ssh-based ad-hoc VPN could forward arbitrary traffic, but I think that would require net-misc/openssh on both ends. Use of Windows makes that difficult.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2183
Location: Kentucky

PostPosted: Fri Jun 10, 2011 3:27 am    Post subject: Reply with quote

The addition of cygwin to window makes it easy. 8)
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Gunnay
n00b
n00b


Joined: 09 Jun 2011
Posts: 4

PostPosted: Fri Jun 10, 2011 7:01 am    Post subject: Reply with quote

Well, the main problem is I don't know if data passed through an only port of the vpn would be able to be correctly redirected when received by my computer. This (these in the best case) game(s) requires a lot of port to be open.

For example, if he wants to send data on two different ports, do my computer recognize the destination ports, even if every data received by my computer comes from an only port?

Possible or not, I thank you for the responses you have given to me :D
Back to top
View user's profile Send private message
devilheart
l33t
l33t


Joined: 17 Mar 2005
Posts: 837
Location: Villach, Austria

PostPosted: Fri Jun 10, 2011 11:35 am    Post subject: Reply with quote

That diagram is not really clear. It seems that to reach the proxy you have to go through the internet. Could you clarify your network topology?
Back to top
View user's profile Send private message
Gunnay
n00b
n00b


Joined: 09 Jun 2011
Posts: 4

PostPosted: Fri Jun 10, 2011 1:01 pm    Post subject: Reply with quote

Indeed, my computer has to act as the proxy which redirect data from my friend's computer. The only way for him to reach my computer (==proxy) is passing through the internet (via tunneling).

I hope I clarify a bit the situation.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2183
Location: Kentucky

PostPosted: Fri Jun 10, 2011 1:29 pm    Post subject: Reply with quote

If you need lots of ports, use openvpn over an ssh tunnel thru his VPN.
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Gunnay
n00b
n00b


Joined: 09 Jun 2011
Posts: 4

PostPosted: Fri Jun 10, 2011 2:22 pm    Post subject: Reply with quote

Going to check it.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2183
Location: Kentucky

PostPosted: Fri Jun 10, 2011 6:33 pm    Post subject: Reply with quote

Openvnc runs on Linux and win doze, so it should bea good fit. 8)
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 16008

PostPosted: Sat Jun 11, 2011 2:35 am    Post subject: Reply with quote

Moriah wrote:
The addition of cygwin to window makes it easy. 8)
The VPN support in net-misc/openssh uses the TUN/TAP support in the Linux kernel. Porting the openssh program to Windows is not sufficient to enable a Windows user to use the ad hoc ssh VPN mode.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2183
Location: Kentucky

PostPosted: Sat Jun 11, 2011 2:43 am    Post subject: Reply with quote

No, its not, but I was only referring to using the cygwin port of openssh to map a single port, which was before he siad they needed a numbe rof ports.

However, using ssh to map port 1194 -- the port openvpn uses -- would allow openvpn to tunnel thru the other vpn and connect to the linux machine in question, which could then forward those ports wherever they needed to go.

This approach ought to be workable on both linux and windoze machines, since the cygwin port of openssh works well enough to map a single port, and openvpn works well on both systems. 8)
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum