Ports and services
Understand transport ports, service conventions, connection context, and why an open port cannot establish which application is safe.
An address is only part of an endpoint
Transport ports help distinguish communication endpoints on a host. A connection or flow is commonly described using source and destination addresses, source and destination ports, and the transport protocol. The protocol is important: a TCP port and a UDP port with the same number do not represent the same transport endpoint.
Services often use conventional port numbers, and IANA maintains a registry of service names and transport port assignments. Those conventions help people interpret traffic, but an application can be configured to listen elsewhere. A number alone is evidence about an endpoint, not a guarantee of its contents or trustworthiness.
A browser and two simultaneous requests
Imagine a laptop opens a secure website while another browser tab accesses a different service. The client uses local transport endpoints so replies can be associated with the relevant communication. The remote services may share a conventional destination port while their addresses and other connection context differ.
If an analyst records only “port 443,” important distinctions disappear. The destination, time, protocol, application context, and observed behavior may all matter. A common port can carry authorized use, a misconfigured service, or activity needing investigation.
Listening is different from successful access
A program listening on a transport port can potentially receive the appropriate traffic, subject to the network path and controls. A scan observation depends on how the endpoint and intermediate devices respond. Silence can have several explanations. Port scanning and Port states develop those interpretation questions.
Even a successful connection does not establish that the caller can perform an application operation. A database listener might accept a network connection and then require authentication. A web application might respond but deny access to a particular record.
Describe a rule completely
Suppose a fictional academy allows its application server to reach a database. A useful network rule describes the source, destination, transport protocol, required port, direction, and business purpose. “Open the database port” leaves too much ambiguity about who can use the path.
Firewalls explains how traffic policy can be enforced. The application and database still need their own identity and permission checks. A permitted transport path does not replace the service's authorization requirements.
Review exposure from the service outward
In a training environment you own, list the services expected to listen on a host and compare them with its observed listeners. For an unexpected entry, identify the owning process and configuration before deciding whether it is harmful. Avoid assuming an unfamiliar number proves an intrusion.
Then draw one legitimate connection using its source and destination endpoints. State which information changes when a second client connects and which stays associated with the service. TCP and UDP explains the transport behavior behind that diagram. The practical skill is connecting port information to a specific service and policy rather than memorizing numbers without context.
References & further reading
Original explanations, with primary references for deeper study.
Cisco: Networking basicsIANA: Service Names and Transport Protocol Port Numbers