From HFML-FELIX Wiki
Jump to: navigation, search

It is not possible to create a “Remote desktop connection” directly to your office PC from the outside world because of firewalls. But by following the following instructions, you can do it.

The tunnel-in-tunnel way

[edit | edit source]

Introduction

[edit | edit source]

Connect from the outside to the server "lilo" with SSH. If you are connected to the server lilo you can set make a port forwarding "tunnel" to the server "felix-control". Once connected with "felix-control" you can make a second tunnel to your own PC and then make a remote desktop connection through that second tunnel.

Setup the first tunnel to felix-control

[edit | edit source]

Setup connection to lilo

[edit | edit source]

  • PuTTY Configuration
    • Host Name: lilo.science.ru.nl
    • Port: 22

Add first tunnel

[edit | edit source]

  • Tunnels (port forwarding)
    • Source port: 2222 (localhost)
    • Destination: felix-control.science.ru.nl:22

Connect

[edit | edit source]
  • You may want to save the now-configured connection
  • Now connect, and login to lilo with your science account.

Search ip address of your own pc

[edit | edit source]

  • Now you are logged in, look up the ip-addres of your PC with the command ethergids. Search by name (e.g. "Michel") or by office number (e.g. "FX-1.16")
  • remember your ip address for the next steps

Setup the second tunnel to your pc

[edit | edit source]

Setup connection to felix-control

[edit | edit source]

  • Open a new session on PuTTY.
  • puTTY Configuration (felix-control on port 2222)
    • Host Name: localhost
    • Port: 2222

Add second tunnel

[edit | edit source]

  • Tunnels (port forwarding)
    • Source port: 3399 (localhost)
    • Destination: your-ip-address:3389
(Here, 3399 is a random free port number, and 3389 is the fixed port number of the RDP server on your pc.)

Connect

[edit | edit source]
  • You may want to save this second connection as well.
  • Now connect, and login to felix-control with your science account.

  • You now should have a tunnel from your-pc-at-home:3399 to your-pc-at-work:3389

Connect to your pc

[edit | edit source]
  • Start Remote Desktop Connection
  • Connect to localhost:3399


Connect to isolator

[edit | edit source]

When you have set the 2 tunnels it is also possible to tunnel through ssh to the network shares via felix-control.

  • Download the program WinSCP
  • Open the 2 tunnels through PuTTY
  • Connect to localhost:2222 with you science login eg. bryanw

  • Now move to the directory /mnt/ and presto there are the mounted shares

The awesome way

[edit | edit source]

In this way it's possible to do it with one connection, and two sequential tunnels.

No screenshots provided because this is advanced level stuff and you should not need them by now.
  • Make sure you've setup passwordless SSH from lilo to felix-control. (hint: involves ssh-keygen and ssh-copy-id)
  • Make one new Putty session with the following settings:
    • Connect to host: lilo.science.ru.nl
    • Add tunnel in Connection/SSH/Tunnels: Local, source: 29981, destination: localhost:29981 (where 29981 should be a 1000 < unique number < 65535)
    • Add remote command in Connection/SSH: ssh -L 29981:aaa.bbb.ccc.ddd:3389 felix-control (where aaa.bbb.ccc.ddd is your work pc's IP address).
  • Save and Connect.
  • Remote desktop to localhost:29981 -> bingo, you're awesome!