Complicated use of VPS to access internal system, using SSH tunnels

0

I am not exactly sure what the best solution would be for this problem, but

I have a VPS with 3 ips. I have a unix system behind a home router with no ports forwarded. I want to be able to access myVPSIP:25566 and get the data on the internal system.

myVPS ---> internal system

How do I go about doing this, I have tried reverse tunneling. If the minecraft server part causes confusion, here is an alternate example that will accomplish the same task.

I have a web server on a computer inside a home network. It cannot get incoming connections, so I purchased a VPS, and it has an IP. I wish to be able to access the web server via the VPS IP. I have tried reverse SSH Tunnel, but am unsure why it does not work.

here is the command I used

ssh -f -R 25566:127.0.0.1:25566 root@myvps -N

macintosh264

Posted 2012-07-14T20:36:32.750

Reputation: 145

Run netstat -l --inet on the vps. What's the output? Does it show tcp port 25566 being forwarded? – dave4420 – 2012-07-15T17:08:14.030

Are you sure you need to forward only tcp port 25566 and not instead/also udp port 25566? – dave4420 – 2012-07-15T17:08:51.657

TCP only, and I'll give it a shot in just a couple minutes, don't have access atm – macintosh264 – 2012-07-15T17:53:01.307

tcp 0 0 *:25565 : LISTEN – macintosh264 – 2012-07-15T17:57:31.277

Are you trying to forward tcp port 25565 or 25566? Or both? You say 25565 in your comment above, but 25566 in your question. – dave4420 – 2012-07-16T08:35:40.843

Answers

0

Your command syntax seems fine; the problem is that you probably have absolutely nothing running on port 25566 on your home computer.

Most likely you meant to access some other service on your home computer. I see that you said you wanted to access the web server. In that case, you would forward to port 80:

ssh -f -R 25566:127.0.0.1:80 root@myvps -N

If you wanted to access something else, change 80 to whatever port number the desired service runs on.

Keep in mind that links on your home web server will not work, since it's assuming you'll be coming in on port 80 rather than 25566.

Michael Hampton

Posted 2012-07-14T20:36:32.750

Reputation: 11 744