LowPowerLab Forum

Software support => Pi Gateway => Topic started by: Jason on November 12, 2018, 02:35:56 PM

Title: Secure Remote Connections
Post by: Jason on November 12, 2018, 02:35:56 PM
Due to some concerns with port forwarding, I tried out using web services that uses secure tunneling.

I tried out remote.it and remote-iot.com.


Pricing plans

First impressions - Once I figured out how to use remote.it's command line interface, I liked the extra step in setting up what ports were remotely accessible.  To set up a connection to access the IoT Gateway, you need to use option 4) Custom (TCP), not it does not use a web browser N, protocol name https, port 443, name [insert your name here].  Then you can use the online remote.it gui to launch a connection.  They will give an address like: proxy13.remot3.it:123456  To access this, put https://proxy13.remot3.it:123456 in your browser address bar, don't forget the https:// part.   
remote-iot.com was also nice to use one I got it figured out.  It does only allow 5 devices to be connected, but that is probably more than enough for most, also since there isn't a seat license, it is likely cheaper for most if/when they go commercial.

Is anyone else interested in using tunnels like this instead of port forwarding and would there be more intrest in a more indepth tutorial on how to set this up?
Title: Re: Secure Remote Connections
Post by: Felix on November 13, 2018, 03:29:17 PM
Great
How exactly are the internal ports 80/443 on the Pi, accessible?
It sounds more like a reverse proxy to me.

You mention using web services and some scripts (that set it all up?).
Do you know what is the mechanism that makes it more secure?
Title: Re: Secure Remote Connections
Post by: Stereodude on November 13, 2018, 05:27:09 PM
Why don't you just shift the ports in your router so they're not at the expected ports from an external side?  I do that for some other protocols in my router.
Title: Re: Secure Remote Connections
Post by: HeneryH on November 13, 2018, 05:30:40 PM
Quote from: Stereodude on November 13, 2018, 05:27:09 PM
Why don't you just shift the ports in your router so they're not at the expected ports from an external side?  I do that for some other protocols in my router.
This is a pretty weak protection because Bots just scan all ports in a scripted manner so bad actors will find open ports whether you use standards or not.
Title: Re: Secure Remote Connections
Post by: Stereodude on November 13, 2018, 05:31:32 PM
Quote from: HeneryH on November 13, 2018, 05:30:40 PM
This is a pretty weak protection because Bots just scan all ports in a scripted manner so bad actors will find open ports whether you use standards or not.
Well, that's what strong passwords are for.
Title: Re: Secure Remote Connections
Post by: Jason on November 13, 2018, 11:09:01 PM
Felix - you might be right about the reverse proxy.  I don't really know all that much about networking or how it makes the ports 80/443 available. I am not sure if it really is any more secure.

One reason to do this for me is that I haven't always been allowed to port forward with the different networks I have been on.
Title: Re: Secure Remote Connections
Post by: HeneryH on November 14, 2018, 10:50:31 AM
Jason,
  The core issue here is that most local networks have one single entry/exit point from/to the internet.  This is fine for any outgoing connection requests from local network devices.  All outgoing requests go through that one entry/exit point and appear to come from the single IP address assigned to that device (your single public facing IP address).  Who cares though if all outgoing requests have the same IP.

The problem is incoming connection requests...  How do we configure the system so that incoming connection requests are handled in a proper and secure manner?

There are a variety of ways.


You also talk about ports 80 and 443.  These are just standard ports for http web protocol and the secure https protocol.  If you want to use 443 SSL, you just need to make sure that your reverse proxy or port forwarding properly handle https in addition to the 80.
Title: Re: Secure Remote Connections
Post by: Jason on November 16, 2018, 09:56:45 AM
I heard back from Remote-IoT.  "The device need send keep live message. The server act as a proxy server. " where the device is this case is a raspberry pi acting as a gateway and the server is "a secure AWS [Amazon Web Service] IoT cloud platform".

Since some networks don't allow any access to the router, ie schools, landlords/roommates, and work places, this seems to be a good solution for some use cases.
Title: Re: Secure Remote Connections
Post by: Jason on November 26, 2018, 10:12:10 PM
I have been trying out both remote.it and remote-iot.com for about a week now.  So far I have found remote.it is much more mobile friendly and because of that, it is currently my preferred service. But both have been working well to connect to the gateway app without port forwarding.