Answers

Remote access to a PLC over 4G through a Raspberry Pi

A Pi next to the PLC can carry its TCP ports to you. Programming software that needs broadcast discovery needs a layer-2 VPN instead.

Asked on Raspberry Pi Forums, May 2013: “Connecting PLC to Pi, remote access”

Short answer

Put the Pi on the PLC's network, give it the 4G link, and forward the PLC's TCP port to your laptop through the Pi's outbound connection. That covers Modbus TCP and most web panels. Vendor tools that find PLCs by broadcast need a routed or bridged VPN instead.

The Pi reaches the PLC on the local network and carries its port to your laptop.PLC192.168.1.50:502Raspberry Pion 4GFieldhand relayrelay.fieldhand.devYour laptop127.0.0.1:8502LANoutbound :443fh forward
The Pi reaches the PLC on the local network and carries its port to your laptop.

Ports that are plain TCP

Modbus TCP (502), Siemens S7 (102) and a PLC's web panel are single TCP connections. With Fieldhand:

fh forward plc-gateway 8502:192.168.1.50:502

Point your tool at 127.0.0.1:8502. A web panel opens straight from the dashboard with Web page and the PLC's address. The Pi only reaches private addresses on its own network, and every connection is in its activity log. See CLI.

When the vendor tool won't see the PLC

Some programming suites find controllers with broadcast or multicast on the local segment, which a TCP forward doesn't carry. For those, use a VPN that routes or bridges the PLC's subnet (WireGuard or OpenVPN on the Pi with routing set up, or an industrial remote-access router such as eWON or Tosibox), or enter the PLC's address by hand if the tool allows it.

Safety

  • Never expose a PLC's port directly to the internet; most have no authentication.
  • Keep the Pi's own access to keys or an audited tool, and log who connected when.

By Abner Souza, who builds Fieldhand. Updated 2026-10-23. Something wrong or out of date? Write to support@fieldhand.dev.

Something wrong or missing on this page? Tell us.