Troubleshooting
Reaching an MPI PLC through a gateway from the WAN
Short answer
An MPI PLC behind an Ewon Flexy keeps no IP of its own: your S7 client targets the gateway interface the path reaches. From the WAN, use the Flexy WAN IP after enabling WAN-to-LAN traffic (reboot required) or a proxy rule with WAN as Proxy External Interface; over the VPN tunnel, use the LAN IP. Clients that omit the MPI node reach one PLC at a time via Destination Node.

On this page
- Which IP address does the S7 client use for an MPI PLC behind the gateway?
- Why does the working LAN setup fail as soon as the client moves to the WAN?
- How do I open the direct WAN-to-LAN path on the Flexy?
- When should I use proxy port forwarding instead of flat WAN-to-LAN?
- How do I keep the LAN address in the project and still reach it over the WAN?
- Can one gateway reach more than one MPI PLC?
- How do I verify the WAN and VPN paths before commissioning?
- Questions asked
An MPI PLC behind an Ewon Flexy has no IP address of its own, so the address your S7 client needs is the address of the gateway interface the path reaches: the WAN IP over the WAN link, the LAN IP through the VPN tunnel. The same transparent conversion serves both — what changes is the reachable interface and the WAN-side permission. This article works the reported case: a Flexy 205 with the MPI extension, an S7-300 on MPI, and WinCC Professional as the client that already went online over the LAN. Below are the WAN-to-LAN and proxy port-forwarding setups, the host route that keeps the LAN address working from the WAN, the one-PLC-at-a-time rule when a client omits the MPI node, and the acceptance test for both paths.
Which IP address does the S7 client use for an MPI PLC behind the gateway? #
The address of the gateway interface your connection path reaches: the Flexy's WAN IP when you come in over the WAN link, its LAN IP when the VPN tunnel carries you, and never an address on the PLC, because the MPI network has none to give.
The gateway runs the ISOTCP transparent-gateway feature: it terminates the client's ISO-on-TCP session on the interface the session reaches and rebuilds it as MPI traffic toward the PLC. The PLC keeps its MPI address only, and nothing in the WAN change gives it, or needs to give it, an Ethernet identity. Configure one address per access path:
| How the engineer connects | Address to configure in the client | Gateway side to prepare |
|---|---|---|
| Direct over the WAN link | Flexy WAN IP | WAN-to-LAN traffic allowed, or a proxy rule with WAN as Proxy External Interface |
| Through the VPN tunnel | Flexy LAN IP | the tunnel itself |
| Both paths, one project | still the LAN IP | host route or default gateway via the WAN IP on the PC |
Decision: pick the row that matches how the engineer will actually connect, and set that address once in the connection entry the project uses.
Why does the working LAN setup fail as soon as the client moves to the WAN? #
Because the gateway treats its WAN and LAN ports as separate interfaces: your client now lands on a port that does not carry the ISO-on-TCP session, and the WAN security does not pass traffic until the setup allows it — the MPI conversion is identical, the reachable address and the permission are not.
Nothing in the existing setup is broken: the LAN session already proved the MPI extension, the I/O server and the conversion, so leave all of that untouched. Two setups give the WAN entry — a flat WAN-to-LAN traffic allowance or a proxy port-forwarding rule — and both still need the WAN security to carry the service. Decision: treat a WAN failure after a working LAN setup as an addressing and permission problem, and fix those two, never the driver or the PLC.
How do I open the direct WAN-to-LAN path on the Flexy? #
Enable the WAN-to-LAN traffic option in the Flexy setup, allow the gateway service on the WAN security — the client's ISO-on-TCP session rides on TCP port 102 — and reboot the Flexy, because the documented procedure reboots the unit immediately after the change.
That allowance is also the security boundary: opening WAN-to-LAN traffic exposes the whole machine LAN to the WAN side, so scope it to the single service and to the engineering hosts that need it instead of permitting everything. The same discipline governs remote SCADA access through firewalls and proxies. If site policy does not accept even one opened service toward the machine LAN, the proxy rule in the next section publishes a single port instead of an open path. Decision: take the direct method when the WAN side is a trusted engineering network and policy accepts one open service.
When should I use proxy port forwarding instead of flat WAN-to-LAN? #
Use the Flexy's proxy port forwarding when you want one published service instead of a general allowance: create a port forwarding (proxy) rule for the gateway service, select WAN as the Proxy External Interface, and allow the traffic on the WAN security exactly as before.
The rule's destination is the LAN-side address of the device that serves the published port, and the gateway maker's knowledge-base walkthrough of port forwarding and proxy rules shows those fields rule by rule. On the client side the two methods are identical: the project targets the Flexy's WAN address either way, so nothing in the connection entry changes between them, while the exposed surface shrinks from an open path to one published service. Decision: take the proxy rule when policy forbids a general WAN-to-LAN allowance, or when several services will share one controlled entry point.
How do I keep the LAN address in the project and still reach it over the WAN? #
Add routing on the engineering PC instead of editing the project: either make the Flexy's WAN IP the PC's default gateway or add a host route that sends the Flexy's LAN IP to the WAN IP, and the connection configuration that already works over the LAN keeps its address.
Worked example, with the addresses of the reported test. The engineering laptop sits on the WAN at 10.1.1.2, the Flexy's WAN interface is 10.1.1.5, and the project holds the LAN address 10.0.0.53. One host route on the laptop makes the LAN address reachable without touching the project:
route add 10.0.0.53 mask 255.255.255.255 10.1.1.5
The mask 255.255.255.255 narrows the route to that single host and sets 10.1.1.5 as its next hop, so only traffic aimed at the gateway's LAN address leaves through the Flexy; every other destination keeps the laptop's normal default gateway, which is why the host route beats pointing the default gateway at the Flexy. Add -p to keep the route across reboots. In the reported test the laptop went online as soon as the client pointed at the WAN address; this route achieves the same reachability with the project untouched. The VPN session still expects the LAN address, and a host route on one PC does not disturb it — the address matrix in the verification section below is the acceptance test for both. Decision: keep the LAN address and add the host route when existing projects already reference it; change the configured address when the WAN path is the only one that matters.
Can one gateway reach more than one MPI PLC? #
Only if your client names the MPI node inside each ISO-on-TCP request: Siemens software normally does, so nothing extra is configured, while a client that omits the node needs a Destination Node fixed in the gateway's S7-400 I/O server, and that fixed value reaches one PLC at a time.
The deciding factor is the content of the ISO-on-TCP request, not the Rack/Slot fields in the client: those fields describe the CPU inside the station the request has reached, and they do not select an MPI node by themselves. Two cases cover everything:
- The request carries the MPI node. Siemens software builds the destination node into its own ISO-on-TCP handling, so each connection names its own PLC and the gateway needs nothing extra. If the STEP 7 side of the project is the unclear part, what STEP 7 is in a PLC project, and which one you need sorts out the versions and their roles first.
- The request omits the MPI node. Set the Destination Node in the gateway's S7-400 I/O server configuration — MPI node 4 in the reported example — and every ISO-on-TCP session received on the LAN or WAN interface is redirected to that one node; reaching a second PLC means changing that setting between commissioning passes.
Decision: with WinCC Professional or another Siemens client, expect multi-PLC access with no gateway change; with a client that omits the node, budget one Destination Node per commissioning pass.
How do I verify the WAN and VPN paths before commissioning? #
Verify each path independently and give each its own address: reach the configured gateway IP from that path, bring the PLC online, and read a real value from every MPI node the application will use before you call the path commissioned.
Work down this list after every change, on both paths:
- LAN baseline first. With the client on the LAN address and no WAN change in place, go online and read one value from each node you plan to use; this proves the MPI extension, the I/O server and the conversion before anything WAN-side is touched.
- Reach, then open. From the WAN laptop, confirm the target address answers, then bring up the real session; answering ping proves routing only, not the ISO-on-TCP session — the standard case is ping works but the PLC program download still fails over remote access.
- Run the address matrix as two tests. Aimed at the LAN address, the client went online through eCatcher and not from the WAN laptop; aimed at the WAN address, it went online from the laptop and not through the tunnel. One address serving both paths needs the host route plus a confirmed WAN security rule.
- Re-check the trio after every gateway change. WAN-to-LAN traffic enabled, WAN security carrying the service, reboot performed; if the tunnel comes up but the gateway stays unreachable, compare against why a VPN-connected Flexy gets an address but cannot be pinged before touching the MPI side.
Decision: sign commissioning off only when each path has gone online with its own address, read a real value, and the matrix has been reproduced after the final reboot.
Questions asked
Why did VPN connectivity drop after I switched the project to the WAN address?
It did not break the tunnel. The WAN-to-LAN permission and the WAN security rule have no effect on the VPN tunnel itself; what stopped working is the client path, because the tunnel expects the gateway's LAN address while the project now carries the WAN address. Point the VPN session's configuration back at the LAN address, or keep one address and add the host route on the WAN-side PC.
Which TCP port must site IT allow for the MPI gateway, and where must it point?
The client's ISO-on-TCP session is defined by RFC 1006 and rides on TCP port 102, so the WAN rule must carry that port to the Flexy interface the client targets: the WAN address for direct or proxy access, the LAN address across the tunnel. Scope the rule to that service and to the engineering hosts rather than opening the machine LAN as a whole.
Can one project configuration serve both the WAN laptop and the VPN session unchanged?
Not unchanged. The tested pairing gives each path its own interface address, so either maintain two connection entries, one per address, or keep the LAN address everywhere and make it reachable from the WAN side with the host route on the PC. Re-run both paths after any routing or security change, since each fix can unpair the other.
Why does a non-Siemens client keep landing on the same MPI PLC no matter what I configure in it?
Because the request that client sends omits the MPI node, and the gateway's fixed Destination Node takes over: every ISO-on-TCP session received on the LAN or WAN interface is redirected to the configured node, MPI node 4 in the reported example. Either make the client send the node in its request, or change the Destination Node each time you move to another PLC.
Does the PC need a special driver in its interface selection, the way some MPI-to-Ethernet gateways require?
No. The gateway presents a plain ISO-on-TCP endpoint, so the standard S7 connection settings in the client point at the chosen interface address and no driver or protocol selection changes on the PC. The gateway-side preparation, meaning the WAN-to-LAN permission or proxy rule, the WAN security and the reboot, is the whole difference from the LAN setup that already works.


