Setting up NanodeRF_multinode for use with a remote PI on a static IP address

Hi

I have set up a Raspberry Pi as an emoncms server connected to my main internet access which is on a static IP address. I have setup port forwarding and can access the server remotely with http://85.233.nnn.nnn/emoncms/.

The nanode will be accessing the server from a different internet connection as it is it is located in another building.

In the nanode you have:-

static byte hisip[] = { 192,168,1,10 };     char basedir[] = "";  and a line that states  //IP address of remote server, only needed when posting to a server that has not got a dns domain name (staticIP e.g local server)

Do I just have to put put 85.233.nnn.nnn in hisip and char basedir[] = "emoncms"; to access the pi (with the correct api key) or do I have to add something as the ip address of the remote server and if so where?

Regards

Ian

ukmoose's picture

Re: Setting up NanodeRF_multinode for use with a remote PI on a static IP address

The quick answer is yes. 

I assume you are using the nanodeRF_multinode sketch?  If so this is what you should need.

char website[] PROGMEM = "";
static byte hisip[] = {85.233.nnn.nnn}; <-- IP ADDRESS OF YOUR RASPPI
boolean use_hisip = true; 
char basedir[] = "/emoncms";

This does come with the caveat about security, as you are opening a common port from the internet to your raspberry pi.  I'd make sure your passwords for both the raspberry pi and for MYSQL are long, complex and change regularly.   I'd also make sure you patch Apache and php on a regular basis.

 

Ian Eagland's picture

Re: Setting up NanodeRF_multinode for use with a remote PI on a static IP address

Many thanks.

I had already considered security. We will only use this Pi as an emoncms server.  We have a static IP as we have some  monitoring cameras and a solar charge controller we can access remotely. They have all been set up with single individual port numbers. Can the apache server also be setup to be accessed with just a single port address we can add to the IP address just to make it a little more difficult to find? Or is that a waste of time?

ukmoose's picture

Re: Setting up NanodeRF_multinode for use with a remote PI on a static IP address

Only an area I've dabbled in, but isn't Apache set up to answer on one port anyway (port 80?), you can change this it's called binding.  But scanning for open ports is so simple, I doubt its worth the time changing it.

I guess a more secure way would be to use a ssh session between the two routers on the two "home" networks therefore not opening port 80 to the internet. But this depends on what routers you have.

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.