Monday, June 29, 2009

Ports (TCP & UDP)

Ports; two types of ports are well known to us- Seaport and airports. What is the use of seaports and airports? Obviously "They are using for the import and export of commodities and also for the passage of humans". Even in our day to day life we use this concept. Daily our Journey starts from home and ends in home. So what is the use of ports? As in the case of home, ports will act as the starting as well as ending point of a journey. There are numerous ports in our computer system too. The function of these ports is similar to that in our daily life; instead of humans and cargos, ports act as terminals for data.

In computer system they act us the starting and end point of a process - TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) of the Internet Protocol suite. What is a protocol? In a simple manner we can say that these are certain laws which should be obeyed for the proper traffic across different networks. Let’s take a daily life example; suppose you are driving your car in a highway and reached a junction. Now traffic is no longer only through a straight line - In junction different roads intersects and here one has to wait for sometime –until the traffic light turns green - before moving ahead. In other words you have to obey the signals (protocols) for the proper (safe) crossing of the junction. If you didn’t obey the rules then it may create problems for others too. So in order to have smooth traffic we have to obey protocols.

Ports are beginning and end points of a process. Now let us take a day to day example of a bus stand. In a bus stand slots for parking the buses are reserved, depends on their destination. So users can easily find out which bus they have to use. Suppose they are parked in wrong slots then? There will be total chaos- wastage of time, energy etc. In the same way certain ports in the computer system are reserved for special purposes.

For example http requests are handled by port number 80, https requests are handled by port number 443, telnet uses port 23 etc. You can find out what is the use for a particular port in this link - TCP & UDP Ports. Ports are classified into 3 categories, a) Well known ports, b) Registered ports, c) Dynamic and/or private ports. Well known ports and registered ports should not be used without IANA (Internet Assigned Numbers Authority) registration. Well known ports are those from 0 to 1023, registered posts are those from 1024 to 49151, and dynamic and/private ports are those from 49152 to 65535.

Sometimes we can see these port numbers on the URL itself. A URL request like http://www.example.com:8000/news would try to connect to the port number 8000 instead of default port number 80.

We know that all the cargos entering a sea port is not scanned in the same way. Suppose some cargos are related to military applications then it will be scanned separately; in the same way different category of goods are scanned in different way. This is also applicable or computer systems too. Due to the heavy attacks of hackers, for the security of data, securing the system from joining zombie networks etc we create a wall for security for computer systems – firewall. Firewalls are the gate keepers and everything has to undergo a tight scrutiny before passing firewalls. Here comes the use of labels, in our common life labels are used for easy identification. In the case of a container a label will be painted in the body to indicate its destination and other details. In the same way data packets will contain the port numbers so that it will be easy to understand the particular ports. And according to this data there will be difference in its implementation in part of the firewall too.

Just assume that ports are like plugs in our usual electric connection; for the proper conduction of electricity through plugs and sockets should have the universal standard. System processes made the connections to transport protocol ports through these sockets.

Port forwarding and port scanning are the two another important things associated with ports. Suppose there is a large seaport and it is difficult for the customs to maintain all the operations with in a single office. So what they can do? The one easy step is to build an additional check in and check out counter in the other end. This is what actually happened in port forwarding. A network port is forwarded from one network node to another; this is what happening in a home network where more then one computer is connected to a router. This allows a remote user to access the ports in a private LAN from outside through Network Address Translation (NAT) enabled router.

Ports are very important to us; they are the entry points for the computer system. In order to keep our data safe we have to protect these ports. If any one wants to exploit the system they will certainly pay their attention to these ports. One of the main questions in his mind will be how can I manipulate the ports according to his wishes. These two types of things are happening in various networks. If Administrator wants to strengthen the door, he will surely check which one is week. Port scanner is software using for this purpose, it will check the open ports. There are different methods for port scanning like SYN Scanning, UDP Scanning, TCP Scanning, ACK Scanning etc.



Ports are important to you, protect it. You can find the port table and its uses in this link Port Tables.

Sajeev

No comments:

Post a Comment