03-01-2008 04:40 PM
Your question is very generic. For lot
of applications, you already have ready-made
Let's take a simple example, Apachhe
httpd server is started and typically
listens on port 80...
I would suggest you read more about
Unix sockets in the first instance.
One of the references is:
STREAMS is an alternative to the Berkeley
STREAMS is a modular architecture for
implementing full-duplex, bidirectional
character I/O between kernel or user space
processes and device drivers.
Its most frequent uses have been in
developing terminal I/O and networking
All modern systems that provide STREAMS
provide sockets (Stream Sockets) too.
STREAMS is more complex than sockets, but it
provides more flexibility than sockets.
However, it is little used in modern software.
You need to learn more about programming. C,
C++, Java, Python, Perl and typically used
to write new applications that use
sockets and/or STREAMS.
03-02-2008 12:03 AM
to make TCP port listenning you need to start daemon/application which listen to that port, once started port will be opened, when you stop the application it will be closed.
03-02-2008 12:43 AM
With "netstat -af net" or "lsof -i" you can check for ports listening(open).
First of all you can start with /etc/inetd.conf.
Second you can start with disabling some startup scripts from starting when a server boots.
But if you want to harden your server check for Bastille, which will do all the work for you.
The /etc/services file is just a list of known ports.
03-02-2008 08:56 PM
> /etc/services file. You can enable or
> disable the ports from this file.
Basically, this is wrong, although it does
seem to be a common misconception. A program
can easily listen on a port which does not
appear in /etc/services. Apache, for
example, gets its port number(s) from its own
configuration file, not from anything in