IMD SolutionComputing LibraryShop main store

How-to

Reach a Node-RED dashboard from your phone over VPN

Remote access and virtualization Published 6 min read

Short answer

A phone reaches a Node-RED dashboard through an approved VPN into the site network, never through a forwarded router port. Prove the page locally at the PC's address and dashboard route, set the bind address and route credential in the settings file, restrict the tunnel to the dashboard host and port, and confirm the values on the phone are live before relying on them.

On this page
  1. Can a phone open a Node-RED dashboard without exposing it to the internet?
  2. Why is forwarding a router port the wrong first fix?
  3. How do you prove the dashboard works locally before adding a VPN?
  4. Which settings decide where the dashboard listens and who may open it?
  5. How do you set up the VPN so the phone reaches one host and one port?
  6. How do you confirm the phone shows live data, not a stale page?
  7. Should the remote dashboard be able to write values into the PLC?
  8. Questions asked

Yes, you can open a Node-RED dashboard from your phone, and the right way is a VPN into the site network, not a forwarded router port. The dashboard is a web page served by the Node-RED runtime on your PC, so the phone needs an authenticated, routable path to that PC on the port and route the runtime already uses. Prove the page on the local network first, check which address the runtime is bound to, then bring the phone in through the site's approved VPN and confirm the values you see are live.

Can a phone open a Node-RED dashboard without exposing it to the internet? #

Yes: keep the dashboard on the site network and give the phone an approved VPN connection, so its browser opens the same address a local laptop uses, with no router port facing the public internet. The working S7 connection on your PC does not change at all: the phone never talks to the PLC, only to the runtime that already does. What you are building is a second client path to a service that already exists.

Why is forwarding a router port the wrong first fix? #

A forwarded router port publishes the dashboard and its editor to unsolicited traffic from the whole internet, and the only thing left between a stranger and your flows, credentials and host is the runtime's own authentication. Three other shortcuts fail the same way:

  • Disabling the PC firewall hides the blocked connection while exposing every unrelated service on the machine; permit only the dashboard traffic from approved networks instead.
  • Changing the S7 connection settings breaks a path that already works; the fault is on the phone-to-PC leg, not the PC-to-PLC leg.
  • Copying the PC browser address unchanged fails because a loopback address means the device running the browser, which on a phone is the phone itself.

The legitimate pattern, an authenticated client reaching an internal service through a controlled boundary, is the one covered for remote SCADA access through firewalls and proxies, and it applies unchanged to a dashboard.

How do you prove the dashboard works locally before adding a VPN? #

Open the dashboard from a second local device over the approved network before any tunnel exists, because a VPN on top of an untested local path stacks two faults and doubles the diagnosis.

  1. On the PC, record the full working address: scheme, port and the dashboard route. The dashboard page and the flow editor are different pages; note both.
  2. Find the PC's address on the interface that faces the phone-access network, for example 192.168.1.50. A machine with virtual or VPN adapters can offer a plausible wrong address, so read the physical interface.
  3. Join the phone to the approved local wireless. A guest network may deliberately isolate wireless clients from wired equipment; verify that policy with the network owner rather than disabling it.
  4. Open the recorded address with any loopback name replaced by the PC address, for example http://192.168.1.50:1880/ui, keeping the same scheme, port and route.
  5. Read the failure mode: a timeout points at routing or filtering between the two devices; a refused connection points at the listener or an active reject; a page that loads without data points at the browser or runtime.
  6. Stop here until this works. Once it does, the VPN only has to extend one known-good path.

Which settings decide where the dashboard listens and who may open it? #

Three settings in the Node-RED settings file, settings.js, decide the phone's fate: the bind address, the listening port and the credential for the dashboard routes, with an encryption option on top of them. When Node-RED runs as a normal application it loads this file at startup, so restart the runtime after editing it.

  • uiHost sets the bind address. In Node-RED 1.x and 2.x the default is 0.0.0.0, which accepts connections on all IPv4 interfaces; setting it to a loopback address is the classic reason the PC browser works while every remote client fails. Setting it to "::" listens on all IPv6 addresses.
  • uiPort sets the listening port, which is the port in the local URL you recorded above.
  • httpNodeAuth defines a single username and password for the dashboard routes. Set it before any remote path exists, even a VPN-only one.
  • The https option serves the editor and dashboard over TLS instead of plain HTTP. Resolve certificate trust properly; never train operators to click through browser warnings.

If Node-RED is embedded in your own application instead, uiHost, uiPort and the editor authentication setting are ignored and you configure bind address, port and auth on the hosting web server yourself.

How do you set up the VPN so the phone reaches one host and one port? #

Give the phone an individual account on the site's approved VPN service, restrict what the tunnel may reach to the dashboard host and its port, and check the return route before you test from outside the building.

  1. Have the network administrator provision an individual account and the supported phone client, with multifactor authentication where the service offers it. If the service is still being chosen, work through a checklist for vetting hardware-key remote access for OT security before committing.
  2. Restrict the destinations. Worked example: the VPN hands out client addresses from 10.8.0.0/24, which is 256 addresses; subtract the network and broadcast addresses and 254 usable clients remain. On the PC's host firewall, allow TCP to 192.168.1.50 port 1880 from 10.8.0.0/24 and nothing else, so one rule covers one host and one port while the rest of the plant network stays unreachable from the tunnel. The NAT and host-firewall discipline here is the same one described in hardening broadband networks with NAT routers and host firewalls.
  3. Check the return route: the PC or its gateway must route the VPN client range back to the VPN server, or the phone's request arrives and the reply never finds its way back.
  4. Test from the phone's cellular connection with the local wireless off: establish the VPN, open the internal dashboard address, confirm the page loads and asks for the credential.
  5. Document the dashboard endpoint, the account owner, the account-removal process and the recovery procedure, and keep credentials out of shared operator notes.

How do you confirm the phone shows live data, not a stale page? #

Compare one changing, nonhazardous process value on the phone against the local display, because a dashboard page can stay fully visible after its data connection has died. Then check how the dashboard indicates a communication loss or stale values; if it shows old numbers with no warning, fix that indication before anyone relies on the phone. Drop and re-establish the VPN and confirm the browser recovers and asks for the credential again. Finally, confirm that a session without the credential cannot open the protected routes, and that no leftover forwarding rule on the router reaches the dashboard from outside.

Should the remote dashboard be able to write values into the PLC? #

Not by default: accept the phone view read-only first, and treat any dashboard button as a machine-control request that needs its own authorization and an approved test plan. A display-only page and a page that writes setpoints carry completely different consequences, and the separation between publishing data and issuing control is the same discipline described for keeping the Node-RED MQTT publish and control paths separate. Test remote commands only under a machine test plan with local personnel controlling the conditions. A dashboard button is not a safety function: protective functions stay in the PLC and the hardwired safety circuit, independent of the phone, browser, VPN and Node-RED runtime.

Questions asked

Does the VPN replace the dashboard username and password?

No. The VPN authenticates the device and the network path, while the dashboard credential authenticates the person opening the route. Keep both, because a borrowed phone with a configured VPN must still stop at the login. Provision individual VPN accounts and remove them when roles change, so every session is attributable to a person rather than to a handset.

Can the phone connect straight to the S7 PLC once the VPN is up?

It should not need to, and the tunnel rules should prevent it. Every displayed value reaches the phone through Node-RED, so only the runtime's host and dashboard port belong in the allowed destinations. Keeping the PLC subnet off the tunnel list stops a compromised phone from speaking directly to the controller, whose protocol was never designed for untrusted clients.

Is a temporary reverse tunnel acceptable instead of a permanent VPN?

Only when the site has approved that provider, its authentication and its audit trail in advance. A tunnel being encrypted does not establish who may use the application at its far end, and each temporary service adds identities, credentials and an account somebody must remember to close. For occasional emergency access a documented, time-bounded tunnel can beat a permanently open path, but the approval comes first.

How many phones can watch the dashboard this way?

The limit is the VPN service's licensing and its client address pool, not Node-RED: the runtime serves each browser independently, so several phones can view the same page at once. Give each person an individual account rather than sharing one, so a lost phone means revoking a single credential, and check the pool size before planning more than a handful of users.

Keep reading

  • Troubleshooting

    Ping works but PLC program download fails over remote access

    ICMP success proves only the routed IP path, not the programming session. A download opens separate query and download connections on documented TCP and UDP ports, and broadcast discovery does not cross a routed VPN. Point the controller's default gateway at the remote-access router LAN address, permit both programming ports to the controller LAN IP, and add the controller manually by IP.

    Remote access and virtualization

  • Selection guide

    Choose a firewall VPN for an industrial remote access router

    The Ewon tunnel is OpenVPN, initiated outbound. For Ewon-client-to-firewall-server mode, buy a firewall with an OpenVPN server role; IPsec or PPTP support is irrelevant. If you only use Talk2M, the firewall needs no VPN role at all, just outbound rules for *.talk2m.com on the ports in KB-0209, which requires hostname and wildcard address objects.

    Remote access and virtualization

  • How-to

    Connecting an SLC 5/03 PLC to an industrial remote access router

    Connect the SLC 5/03's 9-pin channel 0, left in its default DF1 mode, to the router's serial port with a null-modem RS-232 cable at 19,200 baud, keeping it under 3 m. The rectangular port is DH-485 on RS-485 wiring at 19.2 kbps, needs an interface module, and must never meet an Ethernet jack.

    Remote access and virtualization