Simple Tut: Using Nethogs to Monitor Network Traffic…per Process, via @cnxsoft | #linux
Suuuuuper-simple and useful guide from CNX Software on installing nethogs for Ubuntu/Debian to monitor per process network traffic – very cool!
But if you get much more traffic than that, you may want to investigate if another package may transfer data when it detects the connection is up. To analyze traffic, tcpdump and Wireshark are good options, especially if you want to look into the packets data, however such tools do not tell you which process is sending or receiving the data.