2011-12-09

TCP/IP Ports

TCP/IP Ports

Network ports are logical connections, provided by the TCP or UDP protocols at the Transport layer, for use by protocols in the upper layers of the OSI model. The TCP/IP protocol stack uses port numbers to determine what protocol incoming traffic should be directed to. Some characteristics of ports are listed below:

  • Ports allow a single host with a single IP address to run network services. Each port number identifies a distinct service.
  • Each host can have over 65,000 ports per IP address.
  • Port use is regulated by the Internet Corporation for Assigning Names and Numbers (ICANN).

 ICANN specifies three categories for ports.

Categories

Characteristics

Well Known

  • Assigned for specific protocols and services
  • Port numbers range from 0 to 1023

Registered

  • ICANN can assign a specific port for a newly created network service
  • Port numbers range from 1024 to 49151

Dynamic
(Private or High)

  • Assigned when a network service establishes contact and released when the session ends
  • Allows applications to 'listen' to the assigned port for other incoming requests (traffic for a protocol can be received through a port other than the port which the protocol is assigned, as long as the destination application or service is 'listening' for that type of traffic on that port)
  • Port numbers range from 49,152 to 65,535

The following table lists the well known ports that correspond to common Internet services.

Protocol(s)

Port(s)

Service

TCP

20, 21

File Transfer Protocol (FTP)

TCP
UDP

22

Secure Shell (SSH)

TCP
UDP

23

Telnet

TCP
UDP

25

Simple Mail Transfer Protocol (SMTP)

TCP
UDP

53

Domain Name Server (DNS)

UDP

67, 68

Dynamic Host Configuration Protocol (DHCP)

UDP

69

Trivial File Transfer Protocol (TFTP)

TCP

80

HyperText Transfer Protocol (HTTP)

TCP

110

Post Office Protocol (POP3)

TCP

119

Network News Transport Protocol (NNTP)

UDP

123

NTP

TCP
UDP

143

Internet Message Access Protocol (IMAP4)

TCP
UDP

161, 162

Simple Network Management Protocol (SNMP)

TCP
UDP

389

Lightweight Directory Access Protocol

TCP

443

HTTP with Secure Sockets Layer (SSL)

Note: When creating access lists, allow only the port numbers that correspond to the services running on the servers.

Tidak ada komentar: