How to connect OPC UA through a DMZ
No access to YouTube? Click here to view locally
Tutorial summary
- Download and install Cogent DataHub software on three computers, for the OPC UA server, the OPC UA client, and the DMZ.
- On the DMZ computer, configure the DataHub to act as a tunnelling Master.
- Move to the OPC UA server side, and connect that DataHub to the OPC server.
- Configure that same DataHub to act as a tunnelling Slave, and connect it to the DataHub tunnel Master on the DMZ.
- Move to the OPC UA client side and configure that DataHub to also act as a tunnelling Slave to the DataHub tunnel Master on the DMZ.
- Also configure that DataHub to act as an OPC server.
- Connect your OPC UA client.
For more details and options, see the documentation.
DataHub product used: DataHub UA Tunneller.
Step-by-step guide
- How to connect OPC UA through a DMZ, to isolate your OT and IT networks and keep your systems secure. This is done using tunnel/mirroring over three computers, the first one at the OPC UA server, the second one on the DMZ, and the third one for the OPC UA client.
- First download and install Cogent DataHub software on each of the three computers.
- We will start with the DataHub instance on the DMZ machine by configuring it as a Tunnel Master.
- On the DMZ 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 either the OPC server or OPC client computers. Click Apply.
- Still n the Properties window, select Security and then click the Configure button.
- Under Users, click the Add button to add a Built-In User.
- Enter a username and password.
- Uncheck the Require TOTP Authentication box because this is a non-interactive connection. Then click OK.
- In the Roles, check the All Data Full Access box. Then click OK. The DMZ DataHub is now configured as the Tunnel Master.
- Next we will connect to the OPC UA server on the OPC server computer. Switch to that computer.
- On the OPC server computer, start the DataHub, and from the Properties window, select the OPC UA option and click the Add button.
- Choose or enter a Discovery Domain.
- Choose or enter the endpoint URL for the OPC server.
- Leave the other fields at the default settings and click the Connection Test button.
- The connection should succeed. Close the window.
- Leave the Data Transfer options at the default settings.
- Manually select the nodes you want to connect to.
- Or choose Load All Nodes on Server.
- Enter a meaningful name for the data domain. Let’s call it “OPC UA server.”
- Click OK, make sure the “Act as an OPC UA Client” and the “On” button are checked, then click Apply.
- Click View Data to see your data in the Data Browser.
- Now we will configure the tunnel connection to the DMZ.
- 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 a tunnel slave. Then click the Add Master button to add a tunnel master.
- Enter the IP address or computer name for the primary host., the tunnel Master, which is the DMZ computer where the second DataHub instance is running.
- Enter “OPC UA server” for the local data domain here on the Slave, and the same for the remote data domain on the Master.
- Enter the username and password for the networked user that you created on the Master.
- For the Data Flow Direction, choose “Read-write” to send and receive data, or “Write-only” to just send data to the OPC client.
- When the connection is initiated, when it first starts, you want to override the values on the DMZ with the Slave’s values, the OPC server data. So choose the Override option.
- When the connection is lost, you want to mark the data quality for all points over there on the DMZ Master as “Not Connected”. So choose that option.
- You can ignore the rest of the options for now. Click OK and Apply.
- Now move to the DMZ computer.
- On the DMZ 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..
- For the final step, we will connect the OPC UA client.
- Move to the third computer, the OPC client computer. This DataHub instance on this computer will be configured as a tunnel Slave, connecting outbound to the tunnel Master on the DMZ.,
- On the OPC client computer, start the DataHub instance and select the Tunnel/Mirror option. Make sure the Act as a tunnel/mirror slave option is checked, then click the Add Master button to add a tunnel Master.
- Enter the IP address or computer name for the primary host., the tunnel Master, which is the DMZ computer where the second DataHub instance is running.
- Enter “OPC UA server” for the local data domain here on the Slave, and the same for the remote data domain on the Master.
- Enter the username and password for the networked user that you created on the Master.
- For the Data Flow Direction, choose “Read-write” to send data and receive data, or “Read-only” to just receive data coming from the OPC server.
- When the connection is initiated, when it first starts, you want to get all values from the Master on the DMZ, the OPC server data. So choose the “Get all values from the Master” option.
- When the connection is lost, you want to mark the data quality for all points here on the slave as “Not Connected”. So choose “Mark data quality here as Not Connected.
- You can ignore the rest of the options for now. Click OK and Apply.
- Click View Data to see the data, coming across the tunnel from the DMZ. The data is now updating here on this DataHub instance..
- Still on the OPC client machine, in the DataHub Properties window, select OPC UA. 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.
- In your OPC UA client, add the Cogent DataHub server. Then select your nodes.
- Now you are connected. OPC UA server data is being sent through the DMZ to the OPC UA client. No firewalls are open on either the server or client side, isolating the OT and IT networks.
Background
An OPC UA client cannot connect to an OPC UA server through a DMZ very well because OPC UA was not designed to support multi-hop connections.
To solve this problem, the DataHub tunnel/mirror approach encapsulates OPC UA within a unidirectional transport layer that can pass through the DMZ. A DataHub instance acting as an OPC UA client connects to the OPC server, and using the Tunnel/Mirror feature, sends the data to a second DataHub running on the DMZ. The data is then tunnelled to a third DataHub instance configured as an OPC UA server. The OPC UA client connects and receives the data.
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.
