SSH to a computer behind a firewall and router

1

I'm trying to connect to my Raspberry Pi, which is behind a router and a firewall. My PC (running linux) is also behind a router and firewall. Both firewalls only allow the ports you would need for basic internet surfing (80, 443, ...). I'd even prefer the connection to look like 'normal' packets going through the router, to prevent any problems related to ports being blocked or any other type of restriction.

My question: I would like to have an ssh connection to my Raspberry Pi. How can I accomplish this?

  • Could I use some sort of webservice? like this: Raspi <---> webservice (which has a domain name/static ip) <---> PC. All traffic would then go through the allowed ports, looking like normal webtraffic.
  • A VNC connection, or any other remote desktop connection would be fine too.

evertheylen

Posted 2014-01-17T17:26:42.507

Reputation: 219

Why not a serial console, then you bypass needing any web stuff at all. That's been around long before the other mentioned methods.

– nerdwaller – 2014-01-17T17:46:43.630

3

I think this type of question is probably best suited for Raspi.SE

– nerdwaller – 2014-01-17T17:47:40.103

@nerdwaller I don't think anything in my question would only apply to a raspberry pi. It simply reads better if you replace 'Source' and 'Destination' with something more direct, e.g. a rpi. Also, I forgot to mention that the raspi and my PC are of course on a different location. – evertheylen – 2014-01-17T18:26:51.353

I didn't vote you down, for the record. But that is much too broad then, since that really is subject to your network topology. For a rpi, the full proof way is a serial console, hands down. – nerdwaller – 2014-01-17T18:28:26.410

Answers

2

So eventually I solved it myself.

What I used was yaler.net. Their documentation is good enough. They state that their tunnel won't be blocked by (most) firewalls, so it is perfect.

Of course, there may be other comparable relay services, but this one works like a charm for me (and it's free).

BTW: Although their tutorials suppose you're using Raspbian, it works for Arch Linux ARM too. And even more, the service would work on any Linux computer, not just the raspberry pi.

evertheylen

Posted 2014-01-17T17:26:42.507

Reputation: 219

1

SSH can be tunneled over plenty of 'basic internet surfing' protocols including

Alternatively you could just set your raspberry pi's ssh server to listen on port 80 if your firewalls are port based and basic connectivity is your only concern.

Mondrianaire

Posted 2014-01-17T17:26:42.507

Reputation: 284