Connecting Off-Network Devices (Port Forwarding)

If you want to use devices that are in a different network than the rest of the devices in your project, you can connect the off-network devices to your network via port forwarding or routing. In this case, the project controllers serve as router for the off-network devices.

Note

Port forwarding/router function not supported by every device!

Not every device can be used as a router for devices outside the network. The context menu of the ETHERNET connector in the “Protocol” selection field shows whether your device supports port forwarding.

Note

Observe the Controller Configuration!

In order to use a controller as a router and to use it in e!COCKPIT for port forwarding, you must first make corresponding settings in the controller. For WAGO controllers based on Linux, configure the following IP parameters in the WBM on the "TCP/IP" page:

Switch Configuration: "Separated"
IP Address X1: Static IP → IP parameters in the network pointing to "outside"
IP Address X2: Static IP → IP parameters for the network with the downstream controllers
Default Gateway: X1 → Gateway in the network pointing to "outside"
DNS-Server: DNS server in the network pointing to "outside"

Setting Up Controller as Router

  1. Select the controller to be used as router for the off-network device.
  2. Click the ETHERNET connector (gray) of the device in the Network view (Communication view).
  3. Click the black arrow in the context menu next to the protocol to open the selection.
  4. Select “Port forwarding”.
  5. Selecting “Port Forwarding”
  6. Click [Settings] in the context menu.
  7. The “Settings” panel opens. To configure port forwarding, an additional tab is displayed.
  8. “Settings” Panel, “Port Forwarding” Tab
  9. This tab is only displayed in the “Settings” panel if port forwarding has been set up for a device (see Item 4).
  10. Open the “PORT FORWARDING” tab in the menu ribbon.
  11. Click the [Add] button.
Adding Port Forwarding
Adding Port Forwarding

Individual port forwarding

  1. Select Individual port forwarding to create a new line without pre-allocated values. “Individual port forwarding” is especially suited for off-network devices that, e,g., do not use any standard ports.
  2. In the newly created line, highlighted in blue, click the “IP address (target device)” field and enter the IP address of the off-network device to be connected.
    Here, ensure a syntactically valid IP address format, e.g., 192.168.1.15.
    Also, be sure to use an existing IP address.
  3. Click the “Port (router)” field and enter the port number of the controller selected to act as router.
  4. Click the “Port (target device)” field and enter the port number of the off-network device to be connected.

e!COCKPIT-spezifische Portweiterleitung

  1. Select e!COCKPIT -specific port forwarding when the off-network device is a WAGO device. In this case, two lines are pre-allocated with default values: Port 6626 for WAGO connections and Port 11740 for CODESYS connections. You can change these values as needed.
    Proceed as described above:
  2. Click the “IP address (target device)” field in both lines and enter the IP address of the off-network device to be connected.
  3. Click the “Port (router)” field and enter the port number of the controller selected to act as router.

Connecting Off-Network Device

  1. Select the off-network device in the product catalog or the network view (Communication view).
  2. Right-click on the device and select [Connect].
  3. The connection is established via the previously configured routing controller.

Deactivate or Delete Controller Acting as Router

  1. To deactivate a controller's router function, delete the corresponding checkmark in the “Enabled” column in the “Port forwarding” panel.
  2. To delete one or more port forwarding connections, select the corresponding line(s) and click the [Remove] button.

For additional information see: