Linux | Cloud | DevOps | Scripting

Breaking

Ports

Q. What is a port?
Ans: A port is like a docking point in your machine, where remote application can communicate.
Q. What is the range of ports and how many ports are there?
Ans: Port numbers can vary from 0 to 65535, so total we can get 65536 ports.
Q. Why port numbers are just 65536?
Ans: Because of the limitation of TCP/IP stack, which is just 16bit size. So we get only 2^16(2 to the power of 16) ports which are equal to 65536 available ports.
Q. What are the well-known ports or assigned ports or default ports?
Ans: Well-known ports are from 0 to 1023 (total 2^10=1024 ports)
Q. Can we change default port for a service (example Apache, squid)?
Ans: Yes, we can change. In Apache and DNS we can change this using listen configuration entry in httpd.conf and named.conf. Squid have port entry in its squid.conf file to mention port number.
Q. Is there any way I can see all the port information in Linux?
Ans: Yes, you can get that from /etc/services file.
Q. How can I see open ports in Linux?
Ans: Use nmap command.

Well known ports:

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)
636 – ldaps(both tcp and udp)
873 – rsync
989 – FTPS-data
990 – FTPS
993 – IMAPS
1194 – openVPN
2049 – NFS(nfsd, rpc.nfsd, rpc, portmap)
3306 – MySql
3690 – SVN

No comments:

Post a Comment

Pages