# Access Node Red from two subnets

**URL:** <https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018>\
**Category:** General\
**Created:** [22 August 2021 18:01 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018 "2021-08-22T18:01:06Z")\
**Posts on this page:** 19\
**Page:** 2

<div class="post-metadata">

**Author:** ![jwtaylor](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@jwtaylor](https://discourse.nodered.org/u/jwtaylor)\
**Post date:** [26 August 2021 12:15 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018/21 "2021-08-26T12:15:11Z")

</div>

Nope. The NodeRd Pi is connected via wire (only) to one subnet. The client Pi is connected via WiFi (only) to the other subnet. I have also tested with a client wired to the subnet used by the WiFi access point and it has the same problem.

---

<div class="post-metadata">

**Author:** ![jwtaylor](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@jwtaylor](https://discourse.nodered.org/u/jwtaylor)\
**Post date:** [26 August 2021 12:24 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018/22 "2021-08-26T12:24:59Z")

</div>

Hi, Collin -

I installed NR using the following:

_bash \<(curl -sL_ [_https://raw.githubusercontent.com/node-red/linux-_](https://raw.githubusercontent.com/node-red/linux-) \*installers/master/deb/update-nodejs-and-nodered

As requested, I started NR in a terminal session and the startup text is below. Is there a separate log that I should post?

Thanks!

=======================================================================  
pi@raspberrypi: Node-RED console  
Start Node-RED

Once Node-RED has started, point a browser at 192.168.80.80:1880  
On Pi Node-RED works better with the Firefox or Chrome browser

Use node-red-stop to stop Node-RED  
Use node-red-start to start Node-RED again  
Use node-red-log to view the recent log output  
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot  
Use sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to [flows.nodered.org](http://flows.nodered.org)

_Starting as a systemd service._  
_26 Aug 08:03:55 - [info]_  
_Welcome to Node-RED_  
_===================_  
_26 Aug 08:03:55 - [info] Node-RED version: v2.0.5_  
_26 Aug 08:03:55 - [info] Node.js version: v14.17.5_  
_26 Aug 08:03:55 - [info] Linux 5.10.50-v7l+ arm LE_  
_26 Aug 08:03:56 - [info] Loading palette nodes_  
_26 Aug 08:03:57 - [info] Dashboard version 2.30.0 started at /ui_  
_26 Aug 08:03:57 - [info] Settings file : /home/pi/.node-red/settings.js_  
_26 Aug 08:03:57 - [info] Context store : 'default' [module=memory]_  
_26 Aug 08:03:57 - [info] User directory : /home/pi/.node-red_  
_26 Aug 08:03:57 - [warn] Projects disabled : editorTheme.projects.enabled=false_  
_26 Aug 08:03:57 - [info] Flows file : /home/pi/.node-red/flows.json_  
_26 Aug 08:03:57 - [warn]_  
_---------------------------------------------------------------------_  
_Your flow credentials file is encrypted using a system-generated key._  
_If the system-generated key is lost for any reason, your credentials_  
_file will not be recoverable, you will have to delete it and re-enter_  
_your credentials._  
_You should set your own key using the 'credentialSecret' option in_  
_your settings file. Node-RED will then re-encrypt your credentials_  
_file using your chosen key the next time you deploy a change._  
_---------------------------------------------------------------------_  
_26 Aug 08:03:58 - [info] Server now running at 127.0.0.1:1880/_  
_26 Aug 08:03:58 - [info] Starting flows_  
_26 Aug 08:03:58 - [info] Started flows_

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [26 August 2021 13:39 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018/23 "2021-08-26T13:39:10Z")

</div>

Originally you said the pi is running on 192.168.100.100 but this says it is running on 192.168.80.80

what changed?

---

<div class="post-metadata">

**Author:** ![jwtaylor](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@jwtaylor](https://discourse.nodered.org/u/jwtaylor)\
**Post date:** [26 August 2021 14:37 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018/24 "2021-08-26T14:37:57Z")

</div>

I had the wrong info in my original post. The Pi is in fact running at 192.168.80.80., not 192.168.100.100.

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [28 August 2021 07:54 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018/25 "2021-08-28T07:54:03Z")

</div>

Can you setup a ping node on node-red and have it ping the other side of the firewall so we can see if this is a one or two way error ?

Craig

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [28 August 2021 07:55 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018/26 "2021-08-28T07:55:49Z")

</div>

Do you have a linux box on the other (non node red subnet) - can you try and telnet from the commandline on it to port 1880 on the NR box and see if anything is reported back

Craig

---

<div class="post-metadata">

**Author:** ![jwtaylor](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@jwtaylor](https://discourse.nodered.org/u/jwtaylor)\
**Post date:** [29 August 2021 00:20 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018/27 "2021-08-29T00:20:40Z")

</div>

Hi, Craig;

I can successfully ping in both directions between the NR box and a Pi on the other subnet.

Telnet times out. However, I have another box running NGINX on the same subnet as the NR box and I have configured it to listen on port 1880. I can browse to it from the other subnet without a problem and telnet connects too. So it looks like the problem is on the NR box.

Do you know if NR creates a connection log somewhere? I have been unsuccessful looking for one. The command node-red-log doesn’t appear to show connections. I’ve also looked at /var/log/syslog and it shows NR starting (and, later stopping) but it doesn’t show any connection info.

I’m baffled by this…

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [29 August 2021 04:56 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018/28 "2021-08-29T04:56:52Z")

</div>

I do not believe it creates any sort of special connection log.

A couple of things - on the NR box - can you run

netstat | grep 1880 and see what it says

Craig

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 August 2021 06:26 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018/29 "2021-08-29T06:26:22Z")

</div>

Can you install node red on another box on the network NR is on and see whether it exhibits the problem?

---

<div class="post-metadata">

**Author:** ![jwtaylor](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@jwtaylor](https://discourse.nodered.org/u/jwtaylor)\
**Post date:** [29 August 2021 11:49 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018/30 "2021-08-29T11:49:52Z")

</div>

Result of "netstat | grep 1880":

unix 2 [] DGRAM 18804  
unix 2 [] DGRAM 18801

---

<div class="post-metadata">

**Author:** ![jwtaylor](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@jwtaylor](https://discourse.nodered.org/u/jwtaylor)\
**Post date:** [29 August 2021 11:54 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018/31 "2021-08-29T11:54:26Z")

</div>

I did a clean install of the operating system and NR on a PI and that configuration exhibits the same problem. Previously I did a clean install of the operating system and then installed the NGINX web server, configured it for port 1880, and was able to access it from both subnets. These installations were on separate SD cards so I could switch back and forth and confirm that the problem applied only to the NR installation. Both configurations used the same IP address.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 August 2021 12:08 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018/32 "2021-08-29T12:08:31Z")

</div>

Sorry, I meant s completely different install on an unrelated system, a Windows pc for example.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 August 2021 12:23 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018/33 "2021-08-29T12:23:16Z")

</div>

> [@jwtaylor](#):
>
> netstat | grep 1880

I think maybe that should be  
`sudo netstat -tulpn|grep 1880`

---

<div class="post-metadata">

**Author:** ![jwtaylor](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@jwtaylor](https://discourse.nodered.org/u/jwtaylor)\
**Post date:** [1 September 2021 13:12 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018/34 "2021-09-01T13:12:24Z")

</div>

SOLVED!

My NodeRed server runs on a Pi that is connected to my wired LAN. Normally , traffic from the second subnet is routed to NodeRed through that connection. However, by default Pi's enable WiFi if available and my NodeRed server made a second connection to my WiFi. As a result, there were two paths to the NodeRed server from the second subnet, one through the router to the wired connection and the other direct to the WiFi port. Some programs, like "ping" work correctly in that environment but NodeRed does not. I turned WiFi off on the NodeRed server Pi and that fixed the problem.

Thanks to everyone who provided help with this issue!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [1 September 2021 13:25 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018/35 "2021-09-01T13:25:31Z")

</div>

Perhaps you should mark @craigcurtin's post, where he suggested that, as the solution.

---

<div class="post-metadata">

**Author:** ![jwtaylor](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@jwtaylor](https://discourse.nodered.org/u/jwtaylor)\
**Post date:** [1 September 2021 14:00 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018/36 "2021-09-01T14:00:31Z")

</div>

As suggested, I have marked @craigcurtin's post as the solution. I had forgotten that he raised this exact issue. At the time of his post I checked the configuration on the NodeRed Pi and the WiFi settings were blank -- but I now realize that didn't mean WiFi was disabled, just that it was getting its settings via DHCP. I'm embarassed to have made such a rookie mistake!

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [1 September 2021 20:45 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018/37 "2021-09-01T20:45:36Z")

</div>

Glad we got you over the line and resolved this one

Dont forget to screw those firewall settings back down now - now that is a rookie mistake to make to forget they are open in the euphoria of a working solution !

Craig

---

<div class="post-metadata">

**Author:** ![jwtaylor](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@jwtaylor](https://discourse.nodered.org/u/jwtaylor)\
**Post date:** [1 September 2021 22:19 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018/38 "2021-09-01T22:19:08Z")

</div>

Hi, Craig;

Thanks for the reminder. I did remove the ‘allow all-all’ test rule this morning, but I’ll check again to make sure I didn’t overlook anything else on the firewall.

--John

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [15 September 2021 22:19 UTC](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018/39 "2021-09-15T22:19:54Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/access-node-red-from-two-subnets/50018.md?page=1)
