2

This question already has an answer here:

I have a raspberry pi on my home network, on which I do all sorts of stuff (torrentbox, samba server etc)

How can I access my box if I'm in another country or city? I only want command line access, I dont need GUI. One way is port forwarding, but I have a dynamic IP, and although I could get Dynamic DNS, my ISP (India, MTNL) blocks ports at it's will.

But TeamViewer on a PC can be accessed using a teamviewer "ID" and password, without port-forwarding. It also has a VPN so it will be like I'm on a local network.

So what "service" can I use to access my RPi throught a third-party (like TeamViewer) so I do not need to Port Forward or DDNS?

marked as duplicate by goldilocks Apr 27 '15 at 10:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

Agree with Goldilocks. Team viewer works because everything is done through their third party servers, the team viewer program will make a connection to their servers from withing your network, giving the ability to then connect to that device from outside your network

Easiest way to achieve what you are doing is with DDNS / port forwarding. (I know, you don't want to do this) but without coding something up yourself like suggested, it's not possible.

Okay I lie. The way around this is to make your rpi (or router) a VPN endpoint. That way, you can just VPN to your home network from 'where ever' you are and you will have fully access to your lan (and your pi) (This will still require port forwarding, but you can choose any port you like essentially)

0

"my ISP (India, MTNL) blocks ports at it's will"

There's only one way they could do this but still allow for something like teamviewer (which it's implied in your question they do) and that's because the connection to the teamviewer server is initiated from inside your LAN, as opposed to dynamic DNS, in which the DNS is updated from within the LAN, but actual connections to services there are initiated from outside.

So your real problem is that your ISP will not (consistently) allow for incoming connections. You could try, e.g., periodically emailing the IP to somewhere, but that will not get around this if it is the case.

If you want to connect to somewhere but you cannot initiate the connection directly, that somewhere must be connected to some other somewhere that you can connect to; this is (presumably) how teamviewer works. At first glance, this is not necessarily a significant load on the middle party if it can be arranged that your pi could then connect independently to wherever it is your are.

The problem with that is "wherever you are" may just as well be subject to the same restrictions your ISP places on your home LAN. E.g., if it is your phone, your phone service provider may prevent connections initiated from outside. So the development of this kind of software is (I would guess) dead in the water -- no one is going to bother because there is no way to guarantee its usefulness.

That means both you and the pi have to initiate a connection to the third party, and, more significantly, the connection must continue to flow through that third party. This implies you would have to pay that third party some money to support their servers, as (I believe) does teamviewer.

While it would take some programming skill, you could implement this kind of thing yourself via a VPS which might cost you ~$10 US/month -- I am guessing again that this is likely the cheapest solution if you can't find someone besides teamviewer. You might not have to do any programming at all if some form of available VPN software (e.g., openVPN) could accomplish what you want, but you will still have to pay for a server to run it on.

  • I called up my ISP and asked them to open up some ports, they said my modem has an inbuilt firewall which is always on (for "safety"), so I'll get a new modem and port forward my way to freedom! – poiasd Apr 28 '15 at 6:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.