If lsof is installed in your system:
xeon# lsof 2>/dev/null | fgrep :telnet
telnet 18409 alekz 4u IPv4 0xffffff0e3b19c740 0t0 TCP xeon:52431->10.0.0.1:telnet (UknownState_-2094513781)
xeon# lsof 2>/dev/null | fgrep :8080
firefox-b 699 alekz 52u IPv4 0xffffff02db1e0780 0t110637 TCP xeon:51567->dmz:8080 (UknownState_-2094513781)
firefox-b 699 alekz 67u IPv4 0xffffff0e3b0e06c0 0t127870 TCP xeon:47231->dmz:8080 (UknownState_-2094513781)
squid 2778 nobody 8u IPv4 0xffffff01dc8ce080 0t0 TCP *:8080 (UknownState_-359969560)
squid 2778 nobody 22u IPv4 0xffffff01dc6d36c0 0t110637 TCP dmz:8080->xeon:51567 (UknownState_-2094513781)
squid 2778 nobody 41u IPv4 0xffffff01dc8c26c0 0t127870 TCP dmz:8080->xeon:47231 (UknownState_-2094513781)
If lsof is not installed:
- Run pfiles /proc/* | less
- Search for port:
- Press </>
- Type port: 23
- Press <Enter>
The result may look like:
18409: telnet 10.0.0.1
. . .
4: S_IFSOCK mode:0666 dev:318,0 ino:42212 uid:0 gid:0 size:0
O_RDWR|O_NDELAY
SOCK_STREAM
SO_OOBINLINE,SO_SNDBUF(49152),SO_RCVBUF(49640)
sockname: AF_INET 10.0.0.2 port: 52431
peername: AF_INET 10.0.0.1 port: 23
~
~
~