An open remote port that nobody configured is usually a service enabled from the factory, access left behind by a contractor, or a protocol switched on by default in a firmware change, and almost never an attack. It is solved by inventorying what each device listens on, identifying what each port is for, closing what is unnecessary on the device and on the firewall, and recording the change. If the port belongs to a telecontrol protocol in use, protect it instead of closing it.
Symptom
An inventory, a network scan or a cybersecurity audit shows that a relay, gateway or switch in the substation has a TCP or UDP port open to the network, and nobody knows who enabled it or why. Sometimes the alert comes from the firewall, which sees a connection attempt to a service that does not appear in the design.
To understand what protection the security standards give to substation protocols, see IEC 62351: cybersecurity for IEC 61850, 104 and DNP3.
Likely causes, from most to least likely
| Cause | How to recognize it |
|---|---|
| Service enabled from the factory (web, file transfer, unencrypted command-line access) | It appears the same on identical devices of the same series |
| Service switched on for commissioning and not removed | It coincides with the date of the works; it has factory or contractor accounts |
| Firmware change that enables new services or restores defaults | The port appears after an update |
| Telecontrol protocol that is used but was not documented | The port matches a protocol in the design (for example MMS, 104, DNP3 or Modbus) and there are established connections |
| Third-party access (remote maintenance by the manufacturer or integrator) | Connections from addresses outside the addressing plan |
| Overly broad firewall rule that exposes the device | The port answers from zones that should not reach it |
| Unauthorized device or intrusion | Unknown service, unknown source, outside a maintenance window, no ticket |
How to diagnose it
- Identify the port and the service. The numbers assigned by IANA help: 2404 is IEC 60870-5-104, 20000 is DNP3 and 502 is Modbus; 102 is the usual MMS port in IEC 61850, according to manufacturer manuals; 21 is file transfer and 22 encrypted command-line access. A number does not prove the service: confirm it with the device’s service list or with traffic analysis.
- Ask the device what it listens on. Many IEDs show the active services in their communications menu. It is the least invasive method.
- Check for established connections. A live connection tells who uses it; the absence of connections for several days says that probably nobody does.
- Compare with the design. Addressing plan, communications matrix and list of approved services; see OT asset inventory of a substation.
- Check the date of the change. Firmware history, site log and configuration changes.
- Look at the access logs of the device and the firewall: login attempts, accounts used, sources.
Illustrative example
An inventory of ten identical relays shows that eight have the web port and the file transfer port open, and two do not. The two that do not have different firmware and were the last to be updated with a hardening setting. Conclusion: the service is a factory configuration, not anyone’s act; the same setting is applied to the eight and recorded in the inventory.
What to decide, port by port
| Situation | Decision |
|---|---|
| Nobody uses it and the device allows it | Disable on the device and block on the firewall |
| Telecontrol uses it | Keep it, restrict the source, encrypt if the device supports it |
| Manufacturer maintenance uses it | Keep it only on request, through the controlled remote access and with logging |
| It cannot be disabled on the device | Block on the switch or firewall and record the exception with a review date |
| Unknown source or use | Treat it as an incident: preserve logs and consult a specialist |
After every firmware update, repeat the query of active services: the factory value can return, so it is worth keeping the approved list as a comparison reference.
What to do
- Unnecessary service: disable it on the device and block the port on the firewall; both barriers, not just one.
- Telecontrol service in use: restrict the source to the authorized devices, enable the secure variant if it exists (for example, TLS according to IEC 62351-3, “Data and Communication Security – Profiles Including TCP/IP”) and monitor the traffic.
- Accounts: change the factory ones, remove contractor ones and use role-based access control; see account and password management on IEDs and relay access levels and passwords.
- Third-party access: route it through a single controlled point, with approval and logging; see secure remote access to substations.
- Segmentation: the device should not be reachable from zones that do not need it; see OT network segmentation: zones and conduits.
- Documentation: record the service, the port, the owner and the date in the inventory.
Field checklist
- Port, protocol and device identified.
- Active services queried on the device itself.
- Established connections reviewed and sources noted.
- Checked against the design, addressing plan and change log.
- Access logs of the device and the firewall reviewed.
- Decision made: close, restrict or document.
- Change applied on the device and on the firewall, and verified afterwards.
- Inventory updated.
What not to do
- Do not run aggressive scans against relays in service: they can block or restart their communications.
- Do not close a port without knowing whether telecontrol, SCADA or maintenance uses it: you can leave the substation without control or signals.
- Do not close it only on the firewall if the service is still active on the device: the protection then depends on a single rule.
- Do not disable the service on a device without saving its configuration first.
- If there are signs of intrusion (unknown source, new accounts, settings changed without authorization), do not delete logs: isolate it following the response plan and call a specialist.
When to call us
If you need to build the service inventory, define what is closed and what is protected, and leave the devices hardened without losing telecontrol, we review it with you. We configure it remotely. Write to us.
Common problems
Open management port on the substation gateway
On a gateway it matters more than on a relay, because it usually joins the substation network to the link toward the control center. Management ports worth looking for are command-line access (22, SSH; 23, unencrypted Telnet), the web interface (80 and 443) and network management (161 and 162, SNMP, over UDP); the vendor may also use its own port for its configuration tool.
- Find on which interface each service listens. A gateway with two or more network ports may expose management toward the external link too, where only telecontrol should be.
- If management is needed, keep it only on the engineering interface or network, with restricted source, encrypted version and named accounts. Close Telnet and unencrypted web when an alternative exists.
- Before disabling, confirm a tested way in (local console or the encrypted variant) and save the configuration: you may lose remote access to the device.
- Verify afterwards from both sides and check that telecontrol keeps reporting and receiving commands under the procedure.
To go through services one by one you can use the hardening baseline.
Related guides
- Substation protocol security according to IEC 62351
- IED hardening
- IEC 104: port 2404 and TCP connections
- Industrial cybersecurity: introduction to IEC 62443
- Cybersecurity of substations and plants
References
- IEC 62443-3-3, “Industrial communication networks – Network and system security – Part 3-3: System security requirements and security levels”.
- IEC 62351-3, “Data and Communication Security – Profiles Including TCP/IP”.
- IEC 62351-8, “Role-Based Access Control for Power System Management”.
- IANA Service Name and Transport Protocol Port Number Registry.
Frequently asked questions
Does an open port on a relay mean I was hacked?
Not necessarily. Most often it is a service enabled from the factory or by a configuration change. Even so, an open port is already an exposure: identify who uses it, close it if nobody needs it and review the access logs.
Can I scan the ports of a relay in service?
Carefully. An aggressive scan can degrade or restart devices with a limited communications stack. It is better to query the device's own service list, the traffic on the switch or a gentle scan agreed with operations, done outside the highest-risk window.
Do I close the port or protect it?
If no system uses it, close it on the device and on the firewall. If telecontrol uses it, leave it and restrict the allowed source, use the secure variant of the protocol when one exists and monitor the access.