Koozali.org: home of the SME Server

Port forwarding

darlev

Port forwarding
« on: January 17, 2005, 09:32:16 AM »
Hi there all.

I have two machines behind a SME server: 192.168.100.100 and 192.168.200
What I want to be able to do is to ssh into these machines from the outside.

The way that I understand to do this is to set up port forwarding.
I would set up all connections to eg. port 9998 on the server to be forwarded to port 22 on 192.168.100.100, and port 9999 on the server to be fowarded to port 22 on 192.168.100.200
Is this correct?

How would I connect from the outside? Would I just use a ssh client and specify the specific port?
What about ssh keys?  You would surely have 2 different ssh keys for the same IP address on the client side?

Any help would be appreciated.

Regards

Darryn

Offline briank

  • ****
  • 146
  • +0/-0
Port forwarding
« Reply #1 on: January 17, 2005, 03:24:53 PM »
Hi Darryn
I would make a VPN connection to the SME then you can browse the remote n/w or use something like VNC.
Regards
Brian

darlev

Port forwarding
« Reply #2 on: January 18, 2005, 06:24:32 AM »
I don't need to VNC into the boxes (both Linux, with no gui).  I just want to be able to ssh into each of them and to scp to and from them.
Would a VPN be able to do this, and if so, any pointers on where to start? (I know nothing about VPNs)

TIA

Darryn

Offline briank

  • ****
  • 146
  • +0/-0
Port forwarding
« Reply #3 on: January 18, 2005, 11:12:57 AM »
Hi - if you want to ssh to a machine say 192.168.100.100 behind an SME you have to portforward the appropriate port to that machine. If you create a VPN (SME has pptp built in and there are contribs for ipsec) then you have a secure tunnel to your SME and you can see the 192.168.100.xxx machines because you are now effectively connected to that local n/w. So you can browse, putty and scp to any of the clients. It is easy to create a pptp connection, just allow at least one pptp client under remote access and create a user that is allowed VPN client access using server manager. Then create a pptp connection to your SME ip address and log in using the above user name and p/w.
Once the connection is made you can putty to the local client ip and browse with mc and scp.
Good luck
Brian