I want to list the processes which connected to Particular IP and port. Is there any command to achieve this?
Is it possible to list all processes which connected to particular ip and port?
linux;networking;security
With lsof:lsof -nPi @192.168.1.123:443(add -t if your only want the process ids).That lists sockets bound to that address as well.With ss (from iproute2 on Linux):ss state established dst 192.168.1.123 'dport = :443'With PSMisc's fuser:fuser -n tcp ,192.168.1.123,443fuser -n udp ,192.168.1.123,443However note that it (at least version 22.21 here) won't report the IPv6-mapped IPv4 addresses, you'd need separate queries for those:fuser -n tcp ,::FFFF:C0A8:017B,443(::FFFF:C0A8:017B being the IPv6-mapped version of 192.168.1.123).