In the TCP and UDP protocols used in computer networking, a port is a special number present in the header of a data packet. Ports are typically used to map data to a particular process running on a computer. As an example, a server used for sending and receiving email may provide both an SMTP and a POP3 service; these will be handled by different server processes, and the port number will be used to determine which data is associated with which process. This may be considered loosely analogous to simulating the effect of a single server with multiple physical connections. Note that not all transport layers use network ports; for example, although UDP and TCP use ports, ICMP does not.
In both TCP and UDP, each packet header will specify a source port and a destination port, each of which is a 16-bit unsigned integer (i.e. ranging from 0 to 65535), as well as specifying the source and destination network addresses (IP-numbers) among other things. A process may "bind" to a particular port to send and receive data, meaning that it will listen for incoming packets whose destination port matches that port number, and/or send outgoing packets whose source port is set to that port number. Processes may also bind to multiple ports.
Applications implementing common services will normally listen on specific port numbers which have been defined by convention for use with the given protocol — see list of TCP and UDP port numbers below . Typically, these will be low port numbers, and in Unix only processes owned by the superuser can listen on port numbers from 0 to 1023; this is for security to prevent untrusted processes from acting as system services. Conversely, the client end of the connection will typically use a high port number.
Because the port number forms part of the packet header, it is readily interpreted not only by the sending and receiving computers, but also by other aspects of the networking infrastructure. In particular, firewalls (whether implemented in hardware or software) are commonly configured to respond differently to packets depending on their source and/or destination port numbers. Port forwarding is one application of this.
Processes implement connections to TCP and UDP ports by means of sockets. A socket is a transport end-point, which a process can create and then bind to a socket address; in TCP or UDP, a socket address consists of a combination of a port and an IP number. Sockets may be set to send/receive data in one direction at a time, called half duplex, or simultaneously in both directions, called full duplex. (Aside from TCP and UDP ports, sockets may also be bound to software network ports to connect internal programs on a single computer system.)
Because different services commonly listen on different port numbers as discussed, the practice of attempting to connect in sequence to a wide range of services on a single computer is commonly known as port scanning; this is usually associated with malicious cracking attempts.
Most common internet ports are highlighted
Port |
Description |
|---|---|
| 0/TCP,UDP | Reserved; do not use |
| 1/TCP,UDP | TCPMUX (TCP port service multiplexer) |
| 4/UDP | NTP Time Protocol |
| 5/TCP,UDP | RJE (Remote Job Entry) |
| 7/TCP,UDP | ECHO protocol |
| 9/TCP,UDP | DISCARD protocol |
| 13/TCP,UDP | DAYTIME protocol |
| 17/TCP,UDP | QOTD (Quote of the Day) protocol |
| 18/TCP,UDP | Message Send Protocol |
| 19/TCP,UDP | CHARGEN (Character Generator) protocol |
| 20/TCP,UDP | FTP - data port |
| 21/TCP,UDP | FTP - control (command) port |
| 22/TCP,UDP | SSH (Secure Shell) - used for secure logins, file transfers (scp, sftp) and port forwarding |
| 23/TCP,UDP | Telnet protocol - unencrypted text communications |
| 25/TCP,UDP | SMTP - used for sending E-mails |
| 26/TCP,UDP | RSFTP - A simple FTP-like protocol |
| 37/TCP,UDP | TIME protocol |
| 38/TCP,UDP | Route Access Protocol |
| 39/TCP,UDP | Resource Location Protocol |
| 41/TCP,UDP | Graphics |
| 42/TCP,UDP | Host Name Server |
| 49/TCP,UDP | TACACS Login Host protocol |
| 53/TCP,UDP | DNS (Domain Name Server) |
| 57/TCP | MTP, Mail Transfer Protocol |
| 67/UDP | BOOTP (BootStrap Protocol) server; also used by DHCP (Dynamic Host Configuration Protocol) |
| 68/UDP | BOOTP client; also used by DHCP |
| 69/UDP | TFTP (Trivial File Transfer Protocol) |
| 70/TCP | Gopher protocol |
| 79/TCP | Finger protocol |
| 80/TCP | HTTP (HyperText Transfer Protocol) - used for transferring web pages |
| 80/TCP,UDP | Skype - CONFLICT with HTTP listening ports |
| 88/TCP | Kerberos - authenticating agent |
| 101/TCP | HOSTNAME |
| 107/TCP | Remote Telnet Service |
| 109/TCP | POP, Post Office Protocol, version 2 |
| 110/TCP | POP3 (Post Office Protocol version 3) - used for retrieving E-mails |
| 113/TCP | ident - old server identification system, still used by IRC servers to identify its users |
| 115/TCP | SFTP, Simple File Transfer Protocol |
| 118/TCP,UDP | SQL Services |
| 119/TCP | NNTP (Network News Transfer Protocol) - used for retrieving newsgroups messages |
| 123/UDP | NTP (Network Time Protocol) - used for time synchronization |
| 137/TCP,UDP | NetBIOS NetBIOS Name Service |
| 138/TCP,UDP | NetBIOS NetBIOS Datagram Service |
| 139/TCP,UDP | NetBIOS NetBIOS Session Service |
| 143/TCP,UDP | IMAP4 (Internet Message Access Protocol 4) - used for retrieving E-mails |
| 152/TCP,UDP | BFTP, Background File Transfer Program |
| 153/TCP,UDP | SGMP, Simple Gateway Monitoring Protocol |
| 156/TCP,UDP | SQL Service |
| 158/TCP,UDP | DMSP, Distributed Mail Service Protocol |
| 161/TCP,UDP | SNMP (Simple Network Management Protocol) |
| 162/TCP,UDP | SNMPTRAP |
| 179/TCP | BGP (Border Gateway Protocol) |
| 194/TCP | IRC (Internet Relay Chat) |
| 201/TCP,UDP | AppleTalk Routing Maintenance |
| 209/TCP,UDP | The Quick Mail Transfer Protocol |
| 213/TCP,UDP | IPX |
| 218/TCP,UDP | MPP, Message Posting Protocol |
| 220/TCP,UDP | IMAP, Interactive Mail Access Protocol, version 3 |
| 259/TCP,UDP | ESRO, Efficient Short Remote Operations |
| 264/TCP,UDP | BGMP, Border Gateway Multicast Protocol |
| 318/TCP,UDP | TSP, Time Stamp Protocol |
| 323/TCP,UDP | IMMP, Internet Message Mapping Protocol |
| 366/TCP,UDP | SMTP, Simple Mail Transfer Protocol. ODMR, On-Demand Mail Relay |
| 369/TCP,UDP | Rpc2portmap |
| 384/TCP,UDP | A Remote Network Server System |
| 387/TCP,UDP | AURP, AppleTalk Update-based Routing Protocol |
| 389/TCP,UDP | LDAP (Lightweight Directory Access Protocol) |
| 401/TCP,UDP | UPS Uninterruptible Power Supply |
| 411/TCP | Direct Connect Hub port |
| 427/TCP,UDP | SLP (Service Location Protocol) |
| 443/TCP,UDP | HTTPS - HTTP Protocol over TLS/SSL (encrypted transmission) |
| 444/TCP,UDP | SNPP, Simple Network Paging Protocol |
| 445/TCP | Microsoft-DS (Active Directory, Windows shares, Sasser-worm, Agobot, Zobotworm) |
| 445/UDP | Microsoft-DS SMB file sharing |
| 464/TCP,UDP | Kerberos Change/Set password |
| 465/TCP | SMTP over SSL - CONFLICT with registered Cisco protocol |
| 500/TCP,UDP | Isakmp, IKE-Internet Key Exchange |
| 514/TCP | rsh protocol - used to execute non-interactive commandline commands on a remote system and see the screen return |
| 514/UDP | syslog protocol - used for system logging |
| 515/TCP | Line Printer Daemon protocol - used in LPD printer servers |
| 524/TCP,UDP | NCP (NetWare Core Protocol) is used for a variety things such as access to primary NetWare server resources, Time Synchronization, etc. |
| 530/TCP,UDP | Rpc |
| 531/TCP,UDP | AOL Instant Messenger, IRC |
| 540/TCP | UUCP (Unix-to-Unix Copy Protocol) |
| 542/TCP,UDP | commerce (Commerce Applications) (RFC maintained by: Randy Epstein [repstein at host.net]) |
| 546/TCP,UDP | DHCPv6 client |
| 547/TCP,UDP | DHCPv6 server |
| 554/TCP | RTSP (Real Time Streaming Protocol) |
| 563/TCP,UDP | NNTP protocol over TLS/SSL (NNTPS) |
| 587/TCP | email message submission (SMTP) (RFC 2476) |
| 591/TCP | FileMaker 6.0 Web Sharing (HTTP Alternate, see port 80) |
| 593/TCP,UDP | HTTP RPC Ep Map |
| 604/TCP | TUNNEL |
| 631/TCP,UDP | IPP, Internet Printing Protocol |
| 636/TCP,UDP | LDAP over SSL (encrypted transmission) |
| 639/TCP,UDP | MSDP, Multicast Source Discovery Protocol |
| 646/TCP | LDP, Label Distribution Protocol |
| 647/TCP | DHCP Failover Protocol |
| 648/TCP | RRP, Registry Registrar Protocol |
| 652/TCP | DTCP, Dynamic Tunnel Configuration Protocol |
| 654/TCP | AODV, Ad hoc On-Demand Distance Vector |
| 666/TCP | id Software's Doom multiplayer game played over TCP (666 is a reference to the Number of the Beast) |
| 674/TCP | ACAP, Application Configuration Access Protocol |
| 691/TCP | MS Exchange Routing |
| 692/TCP | Hyperwave-ISP |
| 695/TCP | IEEE-MMS-SSL |
| 698/TCP | OLSR, Optimized Link State Routing |
| 699/TCP | Access Network |
| 700/TCP | EPP, Extensible Provisioning Protocol |
| 701/TCP | LMP, Link Management Protocol. |
| 702/TCP | IRIS over BEEP |
| 706/TCP | SILC, Secure Internet Live Conferencing |
| 711/TCP | TDP, Tag Distribution Protocol |
| 712/TCP | TBRPF, Topology Broadcast based on Reverse-Path Forwarding |
| 720/TCP | SMQP, Simple Message Queue Protocol |
| 829/TCP | CMP (Certificate Managemaent Protocol) |
| 860/TCP | iSCSI |
| 873/TCP | rsync File synchronisation protocol |
| 901/TCP | Samba Web Administration Tool (SWAT) |
| 981/TCP | SofaWare Technologies Remote HTTPS management for firewall devices running embedded Checkpoint Firewall-1 software |
| 989/TCP,UDP | FTP Protocol ( data) over TLS/SSL |
| 990/TCP,UDP | FTP Protocol (control) over TLS/SSL |
| 991/TCP,UDP | NAS (Netnews Admin System) |
| 992/TCP,UDP | Telnet protocol over TLS/SSL |
| 993/TCP | IMAP4 over SSL (encrypted transmission) |
| 995/TCP | POP3 over SSL (encrypted transmission) |
The Author