How to tunnel OPC UA – outbound

Summary

  1. Download and install Cogent DataHub software on the OPC server and OPC client machines.
  2. On the OPC client side, configure the DataHub to act as a tunnelling Master.
  3. Switch to the OPC server side, and connect that DataHub to the OPC server.
  4. Then configure it so act as a tunnelling Slave, and connect it to the tunnelling Master on the DataHub on the OPC client side.
  5. Switch back to the DataHub on the OPC client side and configure it to act as an OPC server.
  6. Connect your OPC client.

For more details and options, see the documentation.

Transcript

  1. How to tunnel OPC UA outbound, that is by connecting outbound through a firewall from the OPC server to the OPC client.
  2. First download and install Cogent DataHub software on both the server and client computers.
  3. We will start with the DataHub instance on the OPC UA client machine by configuring it as a Tunnel Master.
  4. On the OPC client computer, start the DataHub, and from the Properties window,, select the Tunnel/Mirror option. Make sure “Accept plain-text connections” is configured for port 4502. That port must be opened on this computer to make the connection, but no firewall ports need to be open on the OPC server computer.  Click Apply. The OPC client side is now configured as the Tunnel Master.
  5. Next we will connect to the OPC UA server on the OPC server computer.  Switch to that computer.
  6. On the OPC server computer, start the DataHub, and from the Properties window, select the OPC UA option and click the Add button.
  7. Choose or enter a Discovery Domain.
  8. Choose or enter the endpoint URL for the OPC server.
  9. Leave the other fields at the default settings and click the Connection Test button.
  10. The connection should succeed. Close the window.
  11. Leave the Data Transfer options at the default settings.
  12. Manually select the nodes you want to connect to.
  13. Or choose Load All Nodes on Server.
  14. Enter a meaningful name for the data domain. Let’s call it “OPC UA server.”
  15. Click OK, make sure the “Act as an OPC UA Client” and the “On” button are checked, then click Apply.
  16. Click View Data to see your data in the Data Browser.
  17. Now we will connect the tunnel outbound through the firewall from the DataHub on this computer to the DataHub on the OPC client computer.
  18. Still on the OPC server computer, select the Tunnel/Mirror option. Make sure the Act as a tunnel/mirror slave option is checked, because this DataHub instance is the tunnel slave. Then click the Add Master button to add a tunnel master.
  19. Enter the IP address or computer name for the primary host., the tunnel Master, which is the OPC client computer where the other DataHub instance is running.
  20. Enter “OPC UA server” for the local data domain here on the Slave, and the same for the remote data domain on the Master.
  21. For the Data Flow Direction, choose “Read-write” to send data and receive data, or “Write-only” to just send data to the OPC client.  Don’t choose “Read-only” because you will be writing data to the Master from the OPC server,
  22. When the connection is initiated, when it first starts, you want to override the OPC client values with the Slave’s values, the OPC server data.  So choose the Override option.
  23. When the connection is lost, you want to mark the data quality for all points over there on the Master as “Not Connected”.  So choose that option.
  24. You can ignore the rest of the options for now.  Click OK and Apply.
  25. Now switch back to the OPC client computer.
  26. On the OPC client computer, click View Data to see the data, coming across the tunnel from the OPC server. The data is now updating here on this DataHub instance..
  27. For the final step, we will connect the OPC UA client.
  28. In the DataHub Properties window on the OPC client machine, select OPC UA and make sure the box for Act as an OPC UA Server is checked, and that the protocols you need are also checked.  Then click Apply.
  29. In your OPC UA client, add the Cogent DataHub server.  Then select your nodes.
  30. Now you are connected.  OPC UA server data is being sent via an outbound connection, tunnelled through the firewall and across the network to the OPC UA client. This is how to tunnel OPC UA outbound.

Background

OPC UA networks well, but it requires the client to connect inbound to the server. To keep all firewalls closed on the server side, you can OPC UA tunnelling, as described above. The tunnel recovers quickly from network outages, and keeps all OPC servers and clients connected during that time.

Skkynet provides Cogent DataHub secure-by-design software and services to let you acquire, aggregate, monitor, control visualize, and network live process data in-plant or over insecure external networks, making it ideal for OT to IT and cloud connections.  You can isolate control networks from cyber attacks and integrate industrial data under a unified namespace, all without compromising the plant.

Cogent DataHub products wheel