lsof -i
Hot dog! Two unix posts in one day!
I just wanted to share my joy in discovering the
-i switch of lsof. The argument to -i can be either a protocol (TCP|UDP), a hostname or ip address or a port number. Or any combination of the above. The result: a nice listing of the processes with connections that match your criteria.