[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: a problem with TCP port



In article <[🔎] 20040203115245.25030.qmail@web13701.mail.yahoo.com> you wrote:
> infact i really know nothing about TCP port(except they are adress for
> transport layer)

Try a TCP/IP Primer. E.g. Chapter 10 on www.ipprimer.com

Essentially a Port is used to allow 

a) different services on the same host (separated by the server's listeing port)
b) multiple connections between the same hosts (separated by the tupel <srcip,srcport,dstip,dstport>

The operating system (network stack) on  the client and server host use the
ports to route the data to the right socket and therefore right application. 

Routers on the network normally only care about the destination ip address.

> i want to know what they mean in fact and how can i open and close them?

There are multiple meansings for open and close, but basically open means:
you have an application listening on a port, waiting for new connections.
closed means: you have no application listening on that port.

You can use "netstat -ltu" to see all listening TCP and UDP Applications.
They listen to a specific address and port, or to a specific port on all
addresses of the host.

It is most common to ensure, that applications you only need on the local net are bound only to a specific internal address (if your host has multiple). This can be configured on a apllication by application base.

BTW: if you use netstat as root, and add the -p and -e option, you will also
see which application and which user is listening on the port.

BTW2: a established tcp connection has ports on both sides reserved. Those
are "kind of" open, because they receive packages, but since they wait for
specific pakcages, they cannot (easyly) abused by unauthorized clients.

Greetings
Bernd
-- 
eckes privat - http://www.eckes.org/
Project Freefire - http://www.freefire.org/



Reply to: