In Linux, I would like to be able to determine whether a given program is connected to a remote server and is transmitting/receiving data. I'd also like to see which IP address or URL the program is connected to, and what data is being transmitted.
For example, is there a way to view a music ripper program's connection to CDDB, and see what it is sending/receiving?
How could I do this?