Pages

Wednesday, September 7, 2011

Port numbers in Linux

 Port numbers in Linux :
                  Ports in computer networking is an application-specific or process-specific software construct serving as a communications endpoint. It is used by Transport Layer protocols of the Internet Protocol Suite, such as Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). A specific port is identified by its number, commonly known as the port number, the IP address with which it is associated, and the protocol used for communication.
The Internet Assigned Numbers Authority (IANA) is responsible for maintaining the official assignments of port numbers for specific uses. However, many unofficial uses of both well-known and registered port numbers occur in practice.

The port numbers are divided into three ranges:

  • Well-Known/Standard Ports   (Range: 0 to 1023 )
                 Used by system processes that provide widely-used types of network services such as SSH, Telnet, SMTP, FTP etc

  • Registered Ports, and    (Range:  1024 to 49151 )
                 Used by specific service upon applications such as Oracle database listener (1521), MySql (3306), Microsoft Terminal server (3389) etc.

  • Dynamic and/or Private Ports. (Range: 49152 to 65535 )
               These ports can’t be registered by IANA.  This is used for custom or temporary purposes and for automatic allocation of short-lived (or ephemeral ) ports which is used internally by application/processes. You can see these ports by running ‘netstat’ command under “Local address” column.

         In Linux, the port details can be viewed by checking the /etc/services file  and the non-standard (un-registered) ports used by the server can be find using /proc/sys/net/ipv4/ip_local_port_range file.
# cat /proc/sys/net/ipv4/ip_local_port_range
32768   61000


Important ports used in linux :

20-FTP Data (For transferring FTP data)

21-FTP Control (For starting FTP connection)

22-SSH(For secure remote administration which uses SSL to encrypt the transmission)

23-Telnet (For insecure remote administration

25-SMTP(Mail Transfer Agent for e-mail server such as SEND mail)

53- DNS(Special service which uses both TCP and UDP)

67-Bootp

68-DHCP

69-TFTP(Trivial file transfer protocol uses udp protocol for connection less transmission of data)

80 -HTTP/WWW(apache)

88-Kerberos

110-POP3(Mail delivery Agent)

123-NTP(Network time protocol used for time syncing uses UDP protocol)

137-NetBIOS(nmbd)

139-SMB-Samba(smbd)

143-IMAP

161-SNMP(For network monitoring)

389-LDAP(For centralized administration)

443-HTTPS(HTTP+SSL for secure web access)

514-Syslogd(udp port)

995-POP3s

2049-NFS(nfsd, rpc.nfsd, rpc, portmap)

2401-CVS server

3306-MySql

6000-6063-X11
 

No comments:

Post a Comment