1

I managed to setup a remote tunnel in UBUNTU to my home pc by issuing the autossh command [in the work pc]:

autossh -M 0 -q -N -o “ServerAliveInterval 60” -o “ServerAliveCountMax 3” -R 8888:localhost:22 root@homepc

So far with the old router everything was working fine I just forwarded port 22 to my laptop and everything went smooth.

Now I changed flat and I have a router that is not completely under my control [I have just a passwd for the wireless but no admin rights access and no physical access to it]. As I guess that I cannot change the config on the router is there anything that I can do ? work pc is behind a firewall.

would be there a way of using 3 pc while the middle one will just forward the data back and forth from home to work ?

HOME <---> PROXY <---> WORK

Is there anything that suitable for ubuntu ? HAMACHI would do or do I require another solution ?

Kenny Rasschaert
  • 8,925
  • 3
  • 41
  • 58
dawez
  • 131
  • 7

1 Answers1

2

Since you can't configure either of the firewalls, any solution would require some machine in the middle.

If you have a VPS somewhere you could set up VPN.

An easier alternative to VPN would be to just do it with a regular SSH tunnel from the client and a reverse SSH tunnel from the server to that VPS.

A VPS being the man in the middle between two firewalled hosts

If you don't have a VPS or something similar, you will indeed have to rely on a service like Hamachi.


There is another option I have been using lately, Teredo tunneling.
Teredo gives you an IPv6 address and makes your machine directly addressable over the internet (to anyone else using IPv6).
This can be both useful and dangerous. Any NAT and firewall for the IPv4 interface in place will be circumvented.

The Teredo implementation for Linux is called Miredo. Install it on Ubuntu using sudo apt-get install miredo.
Make sure to configure your ip6tables, and run sudo update-rc.d -f remove miredo so the connection isn't on by default.
You can then choose when to open it using sudo ifup miredo.
You will need to do this on both machines so they both have IPv6.

Icons used © Jakub Steiner, © Novell, Inc, licensed under CC by-sa.

Kenny Rasschaert
  • 8,925
  • 3
  • 41
  • 58
  • Tried to install TEREDO/miredo but for whatever reason I never managed to have a working solution. At the end I opted for this: http://hints.macworld.com/article.php?story=20030130054733106 as my original idea, I am using a middle computer that is acting as a switchboard between my HOMEPC and the WORKPC. Was taking a while to work but then was working flawlessly. I am using a webserver that I own that has a public IP so can be reachead from both parties. – dawez Jun 08 '11 at 20:59