On Linux, I know that I can list active network connections with lsof -i or netstat. However, as far as I know, this only list connections that are currently open.
If a process makes a short connection and then terminates it (like, for instance, a program "phoning home"), I would miss it unless I happen to run lsof in that exact moment. Is there a way to get a list of servers I have connected to? For instance, a tool that writes the IP address on a file whenever a new connection is opened, system-wide.
Keeping a network sniffer such as wireshark permanently open just for this task seems overkill.