Security Incidents mailing list archives

Re: port 768


From: bugtraq () NETWORKICE COM (Robert Graham)
Date: Fri, 28 Jan 2000 16:10:18 -0800


Obviously /etc/services is not the comprehensive port/service mapping
I thought it to be. Is there another way to quickly create a
comprehensive listing of which services are listening on which ports?

/etc/services' role in life is so that programs can do a "getportbyname()"
in their code in order to get what port they should use. For example, a POP3
email daemon would do a getportbyname("pop3") in order to retrieve the
number 110 that pop3 runs at. The idea is that if all POP3 daemons use
getportbyname(), then no matter what POP3 daemon you run, you can always
reconfigure its port number by editing /etc/services.

However, I have never found this useful and have more often found it an
annoyance.

In any event, if you want to find out what port numbers mean, you should
instead either look them up in a general port reference
(http://www.robertgraham.com/pubs/firewall-seen.html) or run a program
"lsof" on your system (comes with most Linuxes). (man lsof)

Robert Graham


Current thread: