What DCOM is
COM (Component Object Model) lets two programs on the same Windows machine share data and call each other's functions through a well-defined binary interface. DCOM extends that capability across a network: a program on Machine A can call methods on a COM object running on Machine B as if the remote object were local. The network transport, authentication, and marshaling of function calls are handled transparently by the Windows operating system on both machines.
DCOM was introduced with Windows NT 4.0 in 1996, the same year the OPC Foundation released the first OPC DA specification. The timing was not coincidental. The OPC task force deliberately built OPC Classic on COM and DCOM because they were the established Microsoft standards for application interoperability, and because they made it possible for any Windows application to access any OPC-compliant device driver without a custom software interface on each side. This was the specific problem OPC was designed to solve: ending the proliferation of one-to-one driver relationships between SCADA software and hardware PLCs.
For local OPC connections, where the OPC server and the OPC client run on the same Windows machine, COM handles the communication and DCOM is not involved. Local COM is fast, stable, and largely immune to the configuration complexity that DCOM introduces. The vast majority of DCOM-related OPC problems occur in remote OPC configurations, where the OPC server runs on one computer (often the SCADA server or a dedicated OPC server machine) and the OPC client runs on a different computer (a historian, a data logger, a remote HMI, or a different SCADA application).
COM vs DCOM in one sentence: COM is a local inter-process communication standard. DCOM is COM extended across a TCP/IP network. An OPC server is a COM server whether accessed locally or remotely. When accessed from another machine, DCOM becomes the transport. The OPC application code does not change between local and remote configurations; Windows decides whether to route the COM call locally or via DCOM based on whether the server is registered on the local machine or on a remote host.
How DCOM establishes a remote OPC connection
When an OPC client tries to connect to an OPC server on a remote machine, DCOM performs a sequence of steps that involve multiple network connections, Windows authentication, and registry lookups on both machines. Understanding this sequence explains why DCOM configuration involves so many moving parts and why a single misconfiguration in any step breaks the connection silently.
DCOM firewall ports: what needs to be open
| Port | Protocol | Direction | Purpose | Notes |
|---|---|---|---|---|
| 135 | TCP | Inbound to OPC server | RPC Endpoint Mapper: the directory service that tells clients which dynamic port the OPC server is on | Must always be open. Without this, DCOM cannot locate the OPC server at all. This is the first port OPC connectivity troubleshooting checks. |
| 1024-65535 | TCP | Inbound to OPC server | Dynamic data ports: the actual port the OPC server uses for data transfer, assigned by the Endpoint Mapper | Default range is the full dynamic port range. Opening this range is a significant security exposure. Best practice is to restrict DCOM to a defined smaller range (e.g., 5000-5100) via Windows Registry and open only that range in the firewall. |
| Custom range | TCP | Inbound to OPC server | Restricted DCOM port range configured via Registry | Set via HKLM\SOFTWARE\Microsoft\Rpc\Internet, MinPort/MaxPort/UseInternetPorts. Allows the firewall to be opened for only the defined range rather than all dynamic ports. Requires OPC server restart after configuration. |
| N/A | N/A | N/A | OPC tunneling (DataHub) replaces all of the above | DataHub OPC tunneling uses a single configurable TCP port (default 4502), initiated as an outbound connection from inside the OT network. No inbound firewall ports needed on the OPC server side. This is the recommended alternative to DCOM for remote OPC. |
Windows DCOM hardening: what changed and when
Starting in 2021, Microsoft issued a series of Windows security updates that progressively hardened DCOM authentication requirements to address a class of DCOM vulnerabilities. These changes have had significant impact on existing OPC Classic installations that use remote DCOM connections.
