1. Ports
  2. Port 502

Port 502 carries Modbus TCP, the industrial automation protocol that runs factories, power grids, water treatment plants, and manufacturing systems worldwide. When a SCADA system sends a command to open a valve or a PLC reads a temperature sensor, that communication flows through port 502.

This isn't a port for consumer applications. This is infrastructure. This is the nervous system of industrial control systems.

What Modbus Does

Modbus is a communication protocol that allows industrial devices to talk to each other. A SCADA server (the "client" or "master") sends requests to field devices like PLCs, sensors, and actuators (the "servers" or "slaves"). Those devices respond with data or execute commands.

The protocol is simple: request-response messaging with no encryption, no authentication, just direct commands to read values or write new ones. Read a holding register to get the current temperature. Write a coil to turn a motor on. It's that straightforward.1

Modbus TCP is the version that runs over standard TCP/IP networks instead of serial lines. Port 502 is its home.2

The History: 1979 and Programmable Logic Controllers

In 1979, Modicon (a division of Gould Electronics) created Modbus for use with its programmable logic controllers.3 At the time, PLCs were revolutionizing manufacturing — replacing hard-wired relay logic with software-controlled automation. But those PLCs needed a way to communicate with programming panels and other devices.

Modicon published Modbus as an open, royalty-free protocol. No licensing fees. No proprietary lock-in. Anyone could implement it. That openness turned Modbus into the de facto standard for industrial communication.4

In 1996, the Internet Assigned Numbers Authority (IANA) officially assigned port 502 to Modbus TCP.5 By then, Modbus had already been running on serial lines for nearly two decades. The TCP version brought it into the networked world.

In 2004, Schneider Electric (which had acquired Modicon years earlier) transferred ownership of Modbus to the Modbus Organization, a nonprofit association that maintains the protocol and its documentation today.6

How It Works: The Client-Server Model

Modbus TCP follows a client-server model:

  • The client (master) initiates requests — "read input register 40001" or "write coil 00001 to ON"
  • The server (slave) responds with the requested data or confirms the command was executed

Every Modbus device has a set of data addresses organized into four types:

  • Coils (read/write, single bit) — control discrete outputs like turning a motor on or off
  • Discrete Inputs (read-only, single bit) — read discrete inputs like a switch state
  • Holding Registers (read/write, 16-bit) — store configuration values and control parameters
  • Input Registers (read-only, 16-bit) — read sensor data like temperature or pressure

A Modbus request specifies which type of data to access and which address to read or write. The server processes the request and sends back a response.7

It's efficient. It's reliable. It's been working since 1979.

Where Modbus Runs

Modbus is everywhere in industrial automation:

  • Manufacturing plants — PLCs controlling assembly lines, robotic arms, conveyor systems
  • Power generation — monitoring turbines, transformers, circuit breakers, energy meters
  • Water and wastewater treatment — controlling pumps, valves, chemical dosing systems
  • Building automation — HVAC systems, lighting controls, energy management
  • Oil and gas — pipeline monitoring, pressure control, flow measurement

If it's an industrial process and it needs automation, there's a good chance Modbus is involved.8

The Security Problem: No Authentication, No Encryption

Modbus was designed in 1979 for isolated, air-gapped networks. Security meant physical access control — locked doors, fenced perimeters, trusted operators. The protocol itself has:

  • No authentication — any device on the network can send commands
  • No encryption — all data travels in plaintext
  • No integrity checking — messages can be intercepted and modified
  • No replay protection — captured commands can be replayed later9

This wasn't a problem when industrial control systems lived on isolated networks. It became a catastrophic problem when those systems connected to the Internet.

Real-World Attacks

Attackers targeting Modbus can:

  • Read sensitive process data without authorization (data exfiltration)
  • Modify coil states to turn equipment on or off illegally
  • Alter control parameters in holding registers to disrupt operations
  • Inject false commands to cause physical damage
  • Launch denial-of-service attacks to disable industrial processes10

In April 2024, security researchers discovered FrostyGoop, an ICS-specific malware that exploits Modbus to send unauthorized commands to industrial control systems, disrupting operations by manipulating control parameters.11

When port 502 is exposed to the Internet, you're giving the world direct access to machinery that controls physical reality. That's why exposing Modbus to untrusted networks is considered industrial suicide.

Securing Modbus

Since Modbus itself can't be secured, protection happens at the network level:

  • Network segmentation — isolate industrial control networks from corporate networks and the Internet
  • Firewalls — restrict access to port 502 to only authorized devices
  • VPNs — encrypt traffic when Modbus must traverse untrusted networks
  • Intrusion detection systems — monitor for suspicious Modbus traffic patterns
  • Change default credentials — many Modbus devices ship with well-known default passwords12

Modern alternatives like OPC UA offer built-in security features, but Modbus persists because of its simplicity, ubiquity, and the fact that millions of devices already speak it.

  • Port 102 — ISO-TSAP (used by Siemens S7 PLCs for industrial communication)
  • Port 44818 — EtherNet/IP (another industrial automation protocol)
  • Port 20000 — DNP3 (protocol used in electric utility and water/wastewater industries)

Why This Port Matters

Port 502 controls the physical world. The commands flowing through this port don't just move data — they move metal, pump water, generate electricity, control chemical reactions, and operate machinery that could kill you if it malfunctions.

When you flip a light switch, there's a power grid behind it. When you turn on a faucet, there's a water treatment plant behind it. When you buy something manufactured in a factory, there's an assembly line behind it.

Modbus and port 502 are part of that invisible infrastructure. They've been running quietly since 1979, controlling the systems that make modern life possible.

That's the weight this port carries.

Checking What's Listening on Port 502

To see if anything is listening on port 502 on your system:

Linux/Mac:

sudo lsof -i :502
# or
sudo netstat -tulpn | grep :502

Windows:

netstat -ano | findstr :502

If you find something listening on port 502 and you're not running industrial control equipment, investigate immediately.

Frequently Asked Questions

Was this page helpful?

😔
🤨
😃
Port 502: Modbus — The Protocol That Runs the Factory Floor • Connected