IMD SolutionComputing LibraryShop main store

Troubleshooting

Site-to-site VPN up but the SCADA PC cannot reach the remote PLC

Remote access and virtualization Published 7 min read By IMD Solution engineering team

Short answer

An established site-to-site tunnel proves only that the two gateways reach each other. The SCADA PC reaches the remote PLC only when both LAN subnets are distinct, the PC has a working forward route to the remote subnet, and the PLC's default gateway points at its local gateway so replies can return. Verify hop by hop, then test the real SCADA service rather than trusting ping.

On this page
  1. What an established tunnel proves
  2. Collect the address map before touching routes
  3. Check the forward route on the SCADA PC
  4. Check the return path at the PLC
  5. Test hop by hop, then the real service
  6. The decision for each case
  7. Questions asked

The tunnel-up status of a site-to-site VPN proves one thing only: the two gateways reach each other across the WAN. It says nothing about the path from the SCADA PC at site A to the PLC at site B. In a back-to-back gateway setup — two remote sites joined over static-IP cellular links, with every device behind each gateway using that gateway's LAN address as its default gateway — a failing PC-to-PLC ping comes down to one of three faults: an address plan that does not match what is actually configured, a missing or wrong forward route toward the remote subnet, or a missing return path at the PLC. Work the checks below in order, from the address map to the real SCADA service, and the failing hop will name itself.

What an established tunnel proves #

Two gateways that see each other over the tunnel have proved their WAN-side addressing and the encrypted path between the tunnel endpoints. That test runs entirely on WAN addresses and the tunnel's own inner network; no PC, PLC or LAN address appears anywhere in it. A green tunnel therefore leaves four things unverified: whether each gateway forwards LAN-to-LAN traffic at all, whether each gateway's routing table holds a route to the other site's subnet, whether the devices behind them can reply through their default gateways, and whether anything between PC and PLC filters the SCADA service. Every fault left on that list produces the same timeout at the PC, which is why dropping a guess into a routing table rarely fixes anything. Read the addresses first.

Collect the address map before touching routes #

Record these values from the devices themselves, not from the network drawing:

  • LAN IP address and subnet mask of each gateway
  • IP address, mask and default gateway of the SCADA PC
  • IP address, mask and default gateway of the PLC
  • the tunnel's own network range
  • every field of each route already added: destination, mask, next hop, and the device it was installed on

Check overlap with arithmetic. Site A addressed 192.168.10.0 with mask 255.255.255.0 holds 192.168.10.1 through 192.168.10.254; site B addressed 192.168.20.0 with the same mask holds 192.168.20.1 through 192.168.20.254; the two ranges share no address, and the tunnel's own range must sit outside both. A device configured 192.168.10.1 with mask 255.255.0.0 instead claims 192.168.0.0 through 192.168.255.255, every 192.168.20.x address included, and the PC then delivers PLC-bound traffic onto its own LAN without the tunnel ever being selected. The same overlap fault blocks single-gateway setups, as described in why an overlapping gateway LAN subnet blocks PLC access.

Check the forward route on the SCADA PC #

Use this example map and substitute the values you collected:

Item Site A (SCADA side) Site B (PLC side)
Gateway LAN address and mask 192.168.10.1, mask 255.255.255.0 192.168.20.1, mask 255.255.255.0
Endpoint address SCADA PC 192.168.10.50 PLC 192.168.20.30
Endpoint default gateway 192.168.10.1 192.168.20.1

Follow one ping from the PC toward the PLC. The PC masks the destination 192.168.20.30 with its own mask: 192.168.20.30 AND 255.255.255.0 = 192.168.20.0, which is not the PC's subnet, so under the IPv4 host requirements in RFC 1122 the packet goes to the PC's default gateway. With one network card and the VPN gateway set as that default gateway, the forward path already exists and no route needs to be added on the PC.

When the PC's default gateway is something else — a second network card on a machine LAN, or an office router — add an explicit route for the remote subnet with the local VPN gateway as next hop. In Windows command form, for the example map, that reads route add 192.168.20.0 mask 255.255.255.0 192.168.10.1; other operating systems take the same destination, mask and next hop in their own route syntax. Make the entry persistent so it survives a reboot of the SCADA PC.

A route that changes nothing has one of four defects: it was installed on a device that never sees the traffic; its next hop is not on that device's own connected subnet, so the system ignores it; its destination and mask do not match the real remote subnet, so the packets match a different entry; or a more specific route wins. Under longest-prefix match, the selection rule every IPv4 router and host applies, the matching route with the longest prefix carries the packet and the default route with its zero-length prefix loses to everything. Check each field against the map, not against memory.

Check the return path at the PLC #

The forward half only delivers the request. The PLC must reply to 192.168.10.50 and applies the same test with its own mask: 192.168.10.50 AND 255.255.255.0 = 192.168.10.0, which is outside the PLC's own subnet, so the reply has to go to the PLC's default gateway — the far gateway's LAN address. That gateway must then hold a route to site A's subnet with the tunnel as the outgoing path; most site-to-site gateways install it together with the tunnel, but confirm it in the gateway's routing table instead of assuming it.

This is the half most often missed in a back-to-back setup, because every gateway-level test passes while device-to-device traffic fails: the request reaches the PLC through the gateway, and if the PLC's gateway field is empty or points anywhere else, the reply never leaves the PLC's subnet. The PC sees an identical timeout whether the forward route or the return path is broken, which is why the hop-by-hop tests below separate the two.

Test hop by hop, then the real service #

Make one routing change at a time and retest after each, so a new fault cannot hide the original one. Then work down this sequence:

  1. From the PC, ping the local gateway's LAN address. Failure puts the fault in site A's own LAN — patch lead, switch port, network card or the PC's IP settings — and no VPN change will fix it.
  2. From the PC, ping the far gateway's LAN address. Success proves the tunnel carries forwarded traffic and the far gateway can route back toward site A. Silence with a green tunnel can also mean the gateway does not answer pings from tunnel-side sources, so confirm forwarding with the next step before condemning the route.
  3. From the far gateway's own diagnostics, ping the PLC. Failure isolates the fault to site B's LAN or the PLC's addressing, and the VPN drops out of the picture entirely.
  4. From the PC, ping the PLC. With steps 1 to 3 passing, a failure now points at the PLC's default gateway or its mask: set the PLC's gateway to the far gateway's LAN address and retest.
  5. Start the SCADA software and run its own connection test to the PLC. This is the only test that exercises the application path.

A ping exercises one protocol; the SCADA application needs its own ports and session handling, and a device can answer pings all day while refusing the application. The same split appears when a drive answers ping while the PLC connection still fails, and even a working ping does not guarantee that a PLC program download will succeed over remote access. When only the service is blocked while pings pass, check the application's ports against which outbound firewall ports a plant remote access modem needs and against the filtering rules on the PLC itself.

The decision for each case #

  • Tunnel up, but the PC cannot reach the far gateway's LAN address: correct each gateway's route to the other site's subnet — destination, mask and next hop — against the collected map.
  • The PC reaches the far gateway but not the PLC: the fault sits behind it; set the PLC's default gateway to its local gateway's LAN address, then re-check the PLC's mask.
  • Every ping passes but the SCADA software cannot connect: routing is finished; compare the application's ports against the gateway's firewall and the PLC's access control.
  • A route was added and nothing changed: re-read the map for a mask wider than intended, a next hop outside the connected subnet of the device it was installed on, or a more specific route overriding the new one.

Fix the hop the tests name, in that order, and the PC-to-PLC path closes.

Questions asked

Can I put both sites on one subnet to avoid the routing work?

No. A routed tunnel carries IP packets, not layer-2 broadcasts, so ARP cannot cross it and the far devices would be answered locally at both ends. Give each site its own subnet sized to its device count, then let the tunnel carry traffic between the two ranges.

Does every PC and controller behind the gateways need its own route?

Most endpoints need no route of their own; the exceptions are PCs with more than one network card or a default gateway outside the plant network. Controllers and single-card PCs need only a correct default gateway pointing at their local gateway, and the two gateways hold the routes between the subnets. Adding routes device by device turns every gateway change into a site tour.

The network drawing shows /24 masks on both sites. Should I trust it?

Masks live in each device, not on the drawing. Read them back from both gateways, the PC and the PLC before you trust any conclusion in this fault: one controller configured wider than planned changes which subnet it belongs to, and a route sized for the planned mask then misses it. Reading the running values takes minutes and removes the most common false conclusion.

Why does the far gateway not answer a ping from the tunnel side?

Many industrial gateways forward traffic between LAN and tunnel but do not answer packets addressed to their own LAN interface from remote subnets unless that reply behavior is enabled. A silent gateway therefore proves less than it seems. Test forwarding with a device behind the gateway instead, or enable replies on that interface where the manual documents the option.

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

  • Explainer

    How a VPN gateway on a controller routes you to the machine LAN

    A VPN client on the machine-side gateway becomes a router to the machine LAN only when IP forwarding is enabled on both the tunnel and LAN interfaces, the server advertises the machine subnet and binds it to that client with iroute, and replies find a way back through the device gateway or an SNAT rule on the gateway. A worked packet example shows both directions.

    Remote access and virtualization

  • Troubleshooting

    Remote PLC access stops after a service plan change

    When remote PLC access dies after a service plan change, the cloud entitlement layer failed, not the gateway, the LAN or the PLC. Test the four layers in order — gateway power and LAN, gateway configuration, service entitlement, user access — and repair only the layer that fails; no reset, cable change or PLC edit restores a removed subscription.

    Remote access and virtualization