is it possible to find out which Service is running on the basis of port no which is open/listening?
Regards
Manoj
is it possible to find out which Service is running on the basis of port no which is open/listening?
Regards
Manoj
If you have lsof installed you can run it as root and grep for LISTEN. E.g.
root@lcrmdb1:/root >lsof | grep ":ssh (LISTEN)"
lsof: WARNING: compiled for AIX version 5.2.0.0; this is 5.3.0.0.
sshd 209002 root 3u IPv4 0xf100020000632398 0t0 TCP *:ssh (LISTEN)
If you don't have lsof already installed you can choose this option.
Run the command netstat as root and grep it.
root@test/# netstat -an | grep LISTEN
tcp4 0 0 *.22 *.* LISTEN
tcp4 0 0 *.25 *.* LISTEN
tcp4 0 0 *.111 *.* LISTEN
tcp4 0 0 *.199 *.* LISTEN
tcp 0 0 *.657 *.* LISTEN
tcp4 0 0 10.20.224.100.1801 *.* LISTEN
tcp4 0 0 10.20.224.100.1802 *.* LISTEN
tcp4 0 0 10.20.224.100.1858 *.* LISTEN
tcp4 0 0 10.20.224.100.1859 *.* LISTEN
tcp4 0 0 *.1334 *.* LISTEN
tcp4 0 0 *.5555 *.* LISTEN
tcp 0 0 10.20.224.100.6600 *.* LISTEN
tcp4 0 0 *.6000 *.* LISTEN
tcp6 0 0 *.6000 *.* LISTEN
tcp 0 0 *.6604 *.* LISTEN
tcp 0 0 *.6605 *.* LISTEN
tcp 0 0 *.6606 *.* LISTEN
tcp 0 0 *.6607 *.* LISTEN
tcp4 0 0 *.32768 *.* LISTEN
tcp4 0 0 *.32769 *.* LISTEN
tcp4 0 0 *.32774 *.* LISTEN
tcp4 0 0 *.32775 *.* LISTEN
tcp4 0 0 *.10000 *.* LISTEN
tcp 0 0 127.0.0.1.6600 *.* LISTEN
tcp4 0 0 127.0.0.1.33605 *.* LISTEN
tcp4 0 0 *.63672 *.* LISTEN
tcp4 0 0 127.0.0.1.36516 *.* LISTEN
tcp4 0 0 127.0.0.1.36559 *.* LISTEN
tcp4 0 0 *.44678 *.* LISTEN
tcp4 0 0 127.0.0.1.44299 *.* LISTEN