Arduino Forum

Products => Arduino Yún => Topic started by: aabm01 on May 28, 2015, 04:07 pm

Title: Http-reverse with node.js and socket.io
Post by: aabm01 on May 28, 2015, 04:07 pm
Hi.

I want to use my Arduino Yun as a Server, I mean that It can be accessed from around the world (Clients Send GET, PUT, POST, requests, to recover data, or change some parameter that acts over an actuator).

I know that this is a problem because usually this devices are behind a router and have a dynamic IP, and is "visible" only within a local network, e.g., our home network.

I know that there are services like Yaler and Spacebrew that apply the (HTTP REVERSE - RELAY) mechanism, using a intermediate server to redirect the request to the device's local IP.

I would like to find some simple example implemented with node.js and socket.io, to start with or some place where explain how to do it.

PD: I'm using node, node-serialport, socket.io and johnny-five in the Yun.

Thanks
Title: Re: Http-reverse with node.js and socket.io
Post by: mart256 on May 29, 2015, 04:04 am
I though you could open a port on the router to open public access to an specific ip (Yun).
Title: Re: Http-reverse with node.js and socket.io
Post by: edmundronald on May 29, 2015, 06:18 am
an old fashioned way to do this is to register a domain name, use a free dynamic DNS service, and configure your home router to pass external HTTP requests to your server, which itself is configured to a static IP in yori network.

I'm sure there are more modern methods to do the same thing.

Edmund
Title: Re: Http-reverse with node.js and socket.io
Post by: edmundronald on May 29, 2015, 06:22 am
And BTW, whichever way you do this, say goodbye to security on your home network. People will compromise the Yun, then use that to compromise other machines including the router itself from inside the firewall. And yes, they *will* find the Yun by means of an automatic scan on port 80.

Edmund
Title: Re: Http-reverse with node.js and socket.io
Post by: aabm01 on May 29, 2015, 06:25 pm
Hi. Thanks you both !!

Where the boards (Yun), will be applied, there aren't access to the routers, so that's is the reason I would want some way to forget to open ports, etc.

A library that does the work.

Thanks
Title: Re: Http-reverse with node.js and socket.io
Post by: jessemonroy650 on May 30, 2015, 05:08 am
::::SNIP::::

I know that there are services like Yaler and Spacebrew that apply the (HTTP REVERSE - RELAY) mechanism, using a intermediate server to redirect the request to the device's local IP.

::::SNIP::::
You might want to consider:

A reverse SSH Tunnel
Google: https://www.google.com/search?q=ssh+reverse+tunnel (https://www.google.com/search?q=ssh+reverse+tunnel)

Using socket.io (via SSL) to open a shell on the server
Google: node js execute shell (https://www.google.com/search?q=node+js+execute+shell)

Jesse
Title: Re: Http-reverse with node.js and socket.io
Post by: aabm01 on Jun 02, 2015, 08:18 am
I'll take a look. Thanks