PDA

View Full Version : Port Forwarding public port 81 to 9000



Richard Grant
2005-01-23, 07:10
> >Use cygwin/Openssh/PuTTY or some variation of that and tunnel everything
> >through one port.
> I've got no idea how this works. Is there a pure Windows
> solution, rather than Cygwin?
>
> Actually, I'd like to get Openssh/PuTTY working for SoftSqueeze
> anyway - are there any guides anywhere to explain what these things do?

So, here is what I would try.. according to original post:

At *your house*

Assuming a non routable subnet like 192.168.0.0/24.
Router: 192.168.0.1
IIS: 192.168.0.10:80
SlimServer: 192.168.0.20:9000
Other: 192.168.0.30:2402
OpenSSH: 192.168.0.12:22

You could have the three services (ports 80, 9000 and 2402) running on the
same machine. I just split them as an example.

Install Openssh mini Cygwin installation. It will instruct you about your
user name and password.
http://sshwindows.sourceforge.net/

Move IIS listening port from port 80 to port xxxx (any port will do, use
8080 if you like).

Make sure Firewall on all hosts allow loopback connections, or disable
loopback routable interfaces. This may or may not be required in your setup.

Configure router (Belkin ADSL wireless router, model 7630uk) to port forward
all traffic on port 80 to port 22 on the host running OpenSSH ( something
like WAN, * : 80 -> LAN, 192.168.0.12 : 22 ).

At *your work*

Install PuTTY
http://www.chiark.greenend.org.uk/~sgtatham/putty/

Create a new PuTTY configuration file
Session/Hostname: WAN IP of your Belkin router.
Session/Protocol: SSH, it will autofill the Port as 22
Session/Port: 80

You could use port 81 instead of port 80 as long as you change the Belkin
router to use port 81 as well.

Now we'll do three tunnels over the encrypted channel First tunnel will be
for the IIS server that we moved from port 80 to port 8080. Then the
SlimServer on port 9000, and finally the other server running on port 2402.

SSH/Tunnels/Source Port: 8080
SSH/Tunnels/Destination: 192.168.0.10:8080
Click the Add button.

SSH/Tunnels/Source Port: 9000
SSH/Tunnels/Destination: 192.168.0.20:9000
Click the Add button.

SSH/Tunnels/Source Port: 2402
SSH/Tunnels/Destination: 192.168.0.10:2402
Click the Add button.

Session/Saved Sessions: PhilPad
Click the Save button

Now we can Open the connection. Click the Open button. Enter your username
and password. Check the Event Log item in PuTTY by left mouse clicking on
the upper left corner where the little computer icons are in the PuTTY
console window. You should see 3 lines that resemble Local port blah
forwarded to blah blah.

Open browser. Enter http://localhost:9000 to access the slimserver.
http://localhost:8080 to access your web server at home.
http://localhost:2402 to access your other server.

You can obviously add as many services as you like.. all traffic will be
encrypted between your work computer and your home network. Perhaps you'd
also like to install TightVNC on all your home computers so you can control
them all as if you were actually there.

Get TightVNC from
http://www.tightvnc.com/

Have fun.

Richard