Port 502

mbap · TCP/UDP

RangeSystem/well-known port (0–1023)
ProtocolTCP/UDP
Servicembap
Modified2014-06-10

Frequently asked questions

What is port 502 used for?

Port 502 is registered with the IANA for mbap (TCP/UDP). Description: Modbus Application Protocol.

Is port 502 a well-known port?

Yes. Port 502 is in the range 0–1023 (system or well-known ports). On Linux and macOS only privileged processes may bind to these ports.

How do I check whether port 502 is open?

Locally on Linux with ss -tulpn | grep ':502\b', on Windows with netstat -ano | findstr :502. To test a remote host use Test-NetConnection <host> -Port 502 in PowerShell or nc -zv <host> 502 on Linux/macOS.

How do I open port 502 in the firewall?

Ubuntu/Debian (ufw): sudo ufw allow 502/tcp. Fedora/RHEL (firewalld): sudo firewall-cmd --add-port=502/tcp --permanent, then firewall-cmd --reload. Windows (PowerShell as administrator): New-NetFirewallRule -DisplayName "Port 502" -Direction Inbound -Protocol TCP -LocalPort 502 -Action Allow.

IANA registry entries

ProtocolServiceDescription (IANA)
TCPmbapModbus Application Protocol
UDPmbapModbus Application Protocol

Nearby entries