How do I find out what is binding to a port?

rs-freddo

Well-Known Member
May 13, 2003
828
1
168
Australia
cPanel Access Level
Root Administrator
I'm finding problems using port 465. I know linux has a command to see what programs are binding to what ports. Just can't remember what the command is?
 

Manuel_accu

Well-Known Member
Jun 19, 2005
191
0
166
Hi,

simple command is nmap as mentioend below:

nmap -sS -O <IP/host>
Scans all port and list it. It also tries to determine what operating system is running on each host that is up and running.

There are many ways to find the port and maped services. I would suggest you nmap, if you will use this with proper parameter combination it will shows you the list of open ports with programs bind with it alon with program version.
nmap -sS -O -sV <IP/host>
In reverse you can also check the which port is using which pid with the help of fuser command

# fuser http/tcp
shows the list of PID used by httpd process.

netstat is also good shows network statastics.

thx