</>CodexBash
All articles
Networking

Ports explained

What network ports are and how they work: how an IP address plus a port identifies one application, well-known, registered and ephemeral ports, the ports every developer should know, listening on localhost versus all interfaces, finding which program uses a port, firewalls, and Docker port mapping.

CodexBash, , 5 min read

An IP address gets data to the right machine, but a machine runs many programs at once: a web server, a database, an SSH server, your browser with dozens of open connections. Ports get data to the right program. They are just numbers from 0 to 65535, yet they appear constantly in a developer's life: localhost:3000, "port 5432 is already in use", opening port 443 in a firewall, -p 8080:80 in Docker. This article explains what ports are and how to work with them confidently.

Sign in to read the rest

The whole 5 minute article is free with an account, along with every problem, lesson and tutorial. No card.