DNP3 Port Number Explained: TCP/UDP 20000, Secure Port 19999, and Firewall Configuration

By | November 7, 2025

DNP3 runs over IP networks using TCP or UDP port 20000. This port number is the standard for communication between SCADA masters and field devices (RTUs, IEDs) in electric utilities, water systems, and oil and gas pipelines.

The IANA also registered port 19999 for DNP3 Secure (DNP3 over TLS), though it is rarely used in practice — most deployments apply DNP3 Secure Authentication (DNP3-SA v5/v6) on top of the standard port 20000.

This guide covers everything about DNP3 port numbers — from the IANA registration to practical firewall rules you can copy and paste.

1. TCP/UDP Port 20000 — The Standard DNP3 Port

TCP/UDP port 20000 is the default and official port for DNP3 over IP networks. It is defined in IEEE 1815-2012 (the DNP3 standard) and registered with IANA.

Every DNP3 outstation — whether it is an RTU at a substation, an IED in a protection relay, or a remote pump controller — listens on TCP port 20000 by default. The SCADA master (typically at the control center) initiates the TCP connection to this port.

On port 20000, DNP3 traffic is unencrypted by default. The raw DNP3 frames travel in plain text, making them readable by anyone with network access and a packet capture tool like Wireshark.

2. IANA Registration Details

FieldValue
Service Namednp
Port Number20000
Transport ProtocolTCP and UDP
DescriptionDNP — Distributed Network Protocol
ReferenceIEEE 1815-2012
AssignmentIANA registered

IANA also registered:

Service NamePortTransportDescription
dnp20000TCP, UDPDNP3 standard
dnp-sec19999TCP, UDPDNP3 Secure (TLS)

3. TCP vs UDP for DNP3

DNP3 can use either TCP or UDP on port 20000. Each has different use cases:

FeatureTCP (port 20000)UDP (port 20000)
ReliabilityGuaranteed delivery, orderedNo delivery guarantee
ConnectionSession-based (3-way handshake)Connectionless
OverheadHigher (headers, ACKs)Lower
Use casePoint-to-point master-outstationBroadcast, multicast, one-way networks
Deployment share95%+ of real-world DNP3 installationsRare — mainly specialized applications
Packet loss handlingTCP retransmitsDNP3 application layer detects missing data

TCP is the default choice for nearly all modern DNP3 deployments. UDP is used occasionally for broadcasting a master’s messages to multiple outstations simultaneously, or in specific one-way telemetry applications.

4. How DNP3 Uses Port 20000

DNP3 over IP follows a client-server architecture:

RoleTCP BehaviorPort
Outstation (RTU, IED)TCP Server — listens on port 2000020000
Master (SCADA control center)TCP Client — connects to the outstation’s port 20000Ephemeral source port (e.g., 49152–65535)

The outstation always listens. The master always initiates the connection. This is the opposite of many engineers’ intuition — the control center (master) is the one making outgoing connections, not accepting them.

This design has a practical benefit: outstations can sit behind firewalls that block all inbound traffic except from the master’s IP. It is easier to secure a network where field devices only accept connections from known control centers.

5. DNP3 Connection Sequence

For DNP3 over TCP on port 20000:

StepDirectionWhat Happens
1Master → OutstationTCP SYN to port 20000
2Outstation → MasterTCP SYN-ACK
3Master → OutstationTCP ACK — TCP connection established
4Master → OutstationLink Layer Reset (optional)
5Master → OutstationIntegrity PollRead function for Class 0, 1, 2, 3 data
6Outstation → MasterResponse — all static data + buffered events
7Master → OutstationPeriodic class polls (usually Class 1, 2, 3 for events)
8Outstation → MasterUnsolicited Responses — spontaneous events (if enabled)
9Master → OutstationConfirm — acknowledge unsolicited responses
BothKeep-alive, time sync, control commands

The key DNP3 function codes on port 20000:

Function CodeNamePurpose
0x01ReadRequest static or event data
0x02WriteWrite to outstation
0x03SelectSelect a control point (step 1 of SBO)
0x04OperateOperate a selected control point (step 2 of SBO)
0x05Direct OperateOperate without select
0x0DCold RestartRestart the outstation
0x14Enable UnsolicitedEnable unsolicited responses
0x17Delay MeasurementMeasure round-trip delay
0x18Record Current TimeTime synchronization
0x81ResponseMaster’s response
0x82Unsolicited ResponseOutstation-initiated event report

6. Multiple Masters and Multiple Outstations

DNP3 over TCP supports multiple simultaneous connections on port 20000:

ScenarioPort 20000 Behavior
One master, one outstationSingle TCP connection on port 20000
Dual redundant mastersBoth connect to the outstation on port 20000 — outstation supports both
One master, many outstationsMaster opens separate TCP connections to each outstation’s port 20000
Multi-drop on one outstationRare — some outstations accept 4–8 concurrent master connections

Most modern RTUs support 4 to 8 concurrent master connections on port 20000. This is important for redundancy (primary + backup control center) and for engineering access during commissioning.

7. DNP3 Secure Port 19999

IANA registered port 19999 (dnp-sec) for DNP3 Secure over TLS. This was intended as the secure equivalent of port 20000, similar to how IEC 104 has port 2404 (unsecured) and 19998 (TLS).

The Reality

Port 19999 is rarely used in production. Most DNP3 security deployments take one of two approaches:

  1. DNP3 Secure Authentication (DNP3-SA) — application-layer security on port 20000, not a separate port
  2. VPN tunneling — encrypting all DNP3 traffic through IPsec or OpenVPN, preserving port 20000

DNP3 over TLS on port 19999 is defined but has limited vendor support. IEEE 1815-2012 and the newer IEC 62351-3 provide the framework, but adoption is low compared to DNP3-SA.

8. DNP3 Secure Authentication (DNP3-SA)

DNP3-SA adds cryptographic authentication to DNP3 without requiring a different port. It runs on top of the standard port 20000.

FeatureHow It Works
TransportSame port 20000 (TCP or serial)
AuthenticationChallenge-response using HMAC-SHA256
Key managementPre-shared keys (v5) or certificate-based (v6)
ScopePer-message authentication for critical operations (controls, config changes)
OverheadAdds authentication tags to DNP3 frames

DNP3-SA does not encrypt — it only authenticates. Data is still readable in Wireshark. For confidentiality, combine DNP3-SA with VPN or use DNP3 over TLS (port 19999).

For full details, see: DNP3 Secure Authentication (DNP3-SA)

9. Firewall Rules for DNP3 Port 20000

Linux iptables

bash

# Allow DNP3 from SCADA master (10.1.1.10) to outstation (10.2.1.100)
iptables -A INPUT -p tcp -s 10.1.1.10 --dport 20000 -j ACCEPT

# Block all other DNP3 traffic
iptables -A INPUT -p tcp --dport 20000 -j DROP

# Also allow UDP if needed
iptables -A INPUT -p udp -s 10.1.1.10 --dport 20000 -j ACCEPT

Ubuntu UFW

bash

# Allow DNP3 TCP
sudo ufw allow 20000/tcp

# Allow DNP3 only from a specific master subnet
sudo ufw allow from 10.1.1.0/24 to any port 20000 proto tcp

Windows Firewall (PowerShell)

powershell

# Allow inbound DNP3 from SCADA master
New-NetFirewallRule -DisplayName "DNP3" -Direction Inbound -Protocol TCP -LocalPort 20000 -RemoteAddress 10.1.1.10 -Action Allow

# Block all other DNP3 traffic
New-NetFirewallRule -DisplayName "DNP3 Block" -Direction Inbound -Protocol TCP -LocalPort 20000 -Action Block

Cisco IOS ACL

access-list 101 permit tcp host 10.1.1.10 host 10.2.1.100 eq 20000
access-list 101 permit udp host 10.1.1.10 host 10.2.1.100 eq 20000
access-list 101 deny tcp any host 10.2.1.100 eq 20000

Key Rules

  • Never expose port 20000 to the internet without VPN or strict IP restrictions
  • Restrict access to known SCADA master IP addresses only
  • Log all connection attempts for security monitoring
  • For cellular/public-network DNP3, always use VPN or DNP3-SA

10. Wireshark Capture and Display Filters

Capture Filter (before starting capture)

tcp port 20000 or udp port 20000

For DNP3 over TLS:

tcp port 19999

Display Filters

FilterWhat It Shows
dnp3All DNP3 traffic
tcp.port == 20000All traffic on port 20000 (including TCP handshake)
tcp.srcport == 20000Traffic coming from the outstation
tcp.dstport == 20000Traffic going to the outstation
dnp3.al.func == 0x01Read requests
dnp3.al.func == 0x82Unsolicited Responses
dnp3.al.func == 0x04Operate commands (control)
dnp3.src == 1Traffic from DNP3 address 1
dnp3.dst == 10Traffic to DNP3 address 10

Decoding DNP3 on a Non-Standard Port

If your system uses a custom port (e.g., 20001 or 20002), Wireshark will not decode DNP3 automatically. Fix:

  1. Edit → Preferences → Protocols → DNP 3.0 → change the TCP/UDP port
  2. Or right-click a packet → Decode As → TCP port → DNP 3.0

11. Testing DNP3 Port Connectivity

Before configuring DNP3 communication, verify that port 20000 is reachable.

From the SCADA Master

bash

# Test if outstation port 20000 is open
nc -zv 10.2.1.100 20000

# Or using telnet
telnet 10.2.1.100 20000

# Or using PowerShell
Test-NetConnection -ComputerName 10.2.1.100 -Port 20000

On the Outstation

bash

# Linux — verify DNP3 is listening
ss -tlnp | grep 20000

# Expected output:
# LISTEN  0  128  0.0.0.0:20000  0.0.0.0:*  users:(("dnp3_outstation",pid=1234,fd=3))

# Windows
netstat -an | findstr :20000

Common Results

ResultMeaningFix
Connection succeededPort is open and DNP3 outstation is runningOK
Connection refusedPort is not open — outstation service not runningStart the DNP3 service on the RTU
Connection timed outFirewall is blocking the portCheck firewall rules on the outstation and network devices
Host unreachableNetwork path is brokenCheck IP addresses, routing, and physical connectivity

12. DNP3 Port vs Other SCADA Protocol Ports

ProtocolDefault PortTransportSecure PortApplication
DNP320000TCP/UDP19999 (TLS)Utility SCADA (North America, Australia)
Modbus TCP502TCP802 (Modbus Security)Industrial automation
IEC 60870-5-1042404TCP19998 (TLS)Power SCADA (Europe, Asia)
IEC 61850 MMS102TCP3782 (TLS)Substation automation
OPC UA4840TCPSame port (app-layer TLS)IIoT, data integration
EtherNet/IP (CIP)44818TCP2221 (TLS)Industrial control
EtherNet/IP I/O2222UDPReal-time I/O
BACnet/IP47808UDP47808 (same, with BACnet/SC)Building automation

DNP3’s port 20000 is in the User Ports range (1024–49151), unlike Modbus (502) which is in the System Ports range (0–1023). This means DNP3 services can be started by any user on Linux/Unix without root privileges.

ProblemSymptomFix
Wrong port configuredTCP connection refusedVerify both master and outstation use port 20000 (some devices default to 20001)
Firewall blocking port 20000Connection timeoutAdd firewall rule to allow TCP 20000 from the master IP
Outstation not listeningConnection refusedRestart the DNP3 service. Check RTU configuration.
Master connecting to wrong IPNo responseVerify the outstation IP address in the master configuration
Wrong DNP3 addressTCP connects, but no dataVerify DNP3 master address and outstation address match on both sides
Multiple masters not supportedSecond master cannot connectCheck outstation max concurrent connections setting (often 1 by default)
TCP keep-alive missingMaster does not detect broken linkEnable TCP keep-alive on the master. Without it, a dropped connection may not be detected until the next poll timeout.
Port 20000 exposed to internetUnauthorized scan attempts in logsBlock external access. Use VPN or DNP3-SA. Restrict to control center IP.
NAT breaking DNP3Intermittent connection dropsAvoid NAT for DNP3. Use direct routing or VPN.
Wireshark shows TCP but not DNP3Non-standard portConfigure Wireshark Preferences → Protocols → DNP 3.0 → set port

14. Security Best Practices for DNP3 Port 20000

Do

  • Use DNP3-SA (Secure Authentication) for critical controls and configuration changes
  • Restrict port 20000 access by source IP address (master station IP only)
  • Place DNP3 devices on a dedicated SCADA VLAN isolated from IT networks
  • Log all connection attempts — both successful and failed
  • Use VPN for DNP3 over public networks (cellular, internet)
  • Enable TCP keep-alive on the master to detect broken connections
  • Use IDS/IPS with DNP3 protocol awareness (Claroty, Nozomi, Dragos)
  • For remote outstations on cellular, add SIM-based access restrictions (private APN)

Do Not

  • Expose port 20000 to the internet — ever
  • Use DNP3 without DNP3-SA or VPN on untrusted networks
  • Rely on “security by obscurity” (changing to a non-standard port does not add security)
  • Allow DNP3 traffic to pass through corporate IT networks without segmentation
  • Trust default DNP3 addresses — configure unique addresses per outstation

For Utility Environments

  • Follow NERC CIP requirements for port 20000 access control (CIP-005, CIP-007)
  • Implement Electronic Security Perimeter (ESP) boundaries around DNP3 networks
  • Use jump servers in a DMZ for engineering access to outstations
  • Document all port 20000 paths in the BES Cyber System inventory

Summary

DNP3 uses TCP or UDP port 20000 by default. This is the IANA-registered port for communication between SCADA masters and outstations (RTUs, IEDs) in electric utilities, water systems, and pipelines.

The key things to remember:

  • Port 20000 is IANA registered as dnp (TCP and UDP)
  • The outstation is always the TCP server (listens on port 20000). The master is always the TCP client (connects to port 20000).
  • TCP is used in 95%+ of deployments. UDP is rare, mainly for broadcast applications.
  • Port 19999 is registered for DNP3 over TLS (dnp-sec) but rarely used — DNP3-SA on port 20000 is more common
  • Multiple masters can connect to one outstation on port 20000 (typically 4–8 concurrent)
  • Never expose port 20000 to the internet — use VPN or DNP3-SA
  • Use tcp port 20000 as a Wireshark capture filter. Use dnp3 as a display filter.
  • Test connectivity with nc -zv or Test-NetConnection before configuring DNP3 parameters

For DNP3 protocol fundamentals, see: DNP3 Protocol Guide

For DNP3 security details, see: DNP3 Secure Authentication (DNP3-SA)

For Wireshark analysis, see: Wireshark for DNP3: How to Capture, Filter, and Troubleshoot

For frame-level analysis, use the free: Online DNP3 Frame Decoder

Author: Zakaria El Intissar

I'm an automation and industrial computing engineer with 12 years of experience in power system automation, SCADA communication protocols, and electrical protection. I build tools and write guides for Modbus, DNP3, IEC 101/103/104, and IEC 61850 on ScadaProtocols.com to help engineers decode, analyze, and troubleshoot real industrial communication systems.

One thought on “DNP3 Port Number Explained: TCP/UDP 20000, Secure Port 19999, and Firewall Configuration

  1. Bouchtaoui

    Si zakaria,
    Ces vraiment très intéressant un grand merci pour votre effort a élaboré ce site très riche en information concernant les protocols de communication bonne chance pour la suite…..

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *