elbombillo
Posts: 18
Joined: Thu Aug 23, 2012 4:04 pm

Remote access - Nat traversal?

Wed Aug 29, 2012 8:33 pm

I would like always on remote access without opening ports on firewall, I could setup reverse ssh tunnel but it was complicated. Is there a Logmein/gotomypc service I can use but not just screen access I would like to be able to ssh too.

Wendo
Posts: 142
Joined: Sun Jun 10, 2012 8:27 pm

Re: Remote access - Nat traversal?

Wed Aug 29, 2012 8:49 pm

You could try teamviewer, it supposedly has a debian package (although unless it's in the main repo the chances of it running on arm are probably slim), there is also a tar.gz file which I assume is source that may compile.

Other than that the only thing I can think of would be to setup some other tunneling system, but for that you'd need a server somewhere it could connect to with a domain name or static IP. I'm thinking an auto starting VPN client on the pi or using vtun.

Failing that, just port forward. You don't mention why you don't want to port forward but unless it's because you don't control the gateway device just do it. It'll save you more time and grief.

User avatar
alexandru.cucu
Posts: 75
Joined: Mon Sep 05, 2011 6:07 pm
Contact: Website

Re: Remote access - Nat traversal?

Thu Aug 30, 2012 12:40 am

TeamViewer for Linux is actually for Windows, running under Wine.
Don't bother installing on the R-Pi, it won't work.
https://launchpad.net/~alexandru.cucu

elbombillo
Posts: 18
Joined: Thu Aug 23, 2012 4:04 pm

Re: Remote access - Nat traversal?

Thu Aug 30, 2012 12:58 am

Code: Select all

/usr/bin/ssh -nNTR 10010:localhost:22  -nNTR 10009:localhost:5900 -o ServerAliveInterval=240 remoteuser@myserver.dyndns.org
I guess I'm back to making a ssh key exchange and a reverse ssh script. This will allow me to connect trough my remote server to the Raspberry Pi without opening ports on remote router.

pi-man-uk
Posts: 62
Joined: Tue May 08, 2012 1:41 pm

Re: Remote access - Nat traversal?

Thu Aug 30, 2012 8:47 am

this SSH method of NAT traversal is very interesting to me - care to elaborate. I'm using Pis at various locations for remote access - it's an ideal machine to SSH onto a remote home network to troubleshoot or what not. The sticking point it always arsing about with the remote router and port forwarding - a pain.

I'd love a way to build an SD card and ship it in the post - ask a user to plug it into the pi and then know that when the pi next boots it'll be accesabile on the net via ssh (without any need to change router settings).

I noticed some services like "pagekite" look to help out with this problem.

It looks like your NAT traversal method using the built in SSH command achieves this simply and elegantly using built in SSH?

Needs to be rock solid reliable of course so as never to lose the ability to remote access.

OPrime
Posts: 2
Joined: Thu Aug 30, 2012 10:39 am

Re: Remote access - Nat traversal?

Thu Aug 30, 2012 10:54 am

You will always have the problem that you need some presence on the public internet in order to accept incoming connection, whether it be your server, or a Hamachi-like mediation server somewhere else. However, if you are willing to set up port forwarding once, you could use N2N (http://www.ntop.org/products/n2n/) to set up your own mediation server which would allow all your devices to connect to each other and form a virtual LAN from behind NATs. The private mediation server does not have to run on a raspberry pi, or even at the same location.

elbombillo
Posts: 18
Joined: Thu Aug 23, 2012 4:04 pm

Re: Remote access - Nat traversal?

Fri Aug 31, 2012 4:25 am

It is a little envolved but essentially you would need to have a server on the public internet running SSH at all time and your traffic will go through that server. Please review the following URL

http://www.marksanborn.net/howto/bypass ... sh-tunnel/

Return to “Networking and servers”