You can install and activate auditd
. Add there rules in audit config:
-a always,exit -F arch=b64 -S connect -F key=CONNECT
-a always,exit -F arch=b64 -S bind -F key=BIND
-a always,exit -F arch=b64 -S socket -F key=SOCKET
-a always,exit -F arch=b64 -S listen -F key=LISTEN
-a always,exit -F arch=b64 -S shutdown -F key=SHUTDOWN
-a always,exit -F arch=b64 -S close -F key=CLOSE
and you will have in audit logs you can monitor socket related system calls.
If you want to find now old information (and do not have audit
) I do not think you will find relevant information in linux.