I am looking for a method in linux to log the amount of data transmitted (received and sent separately) for every single IP address to which the data was sent to or received from. These statistics would be running on the router, behind which is a private network. I am looking for statistics between the private network and the internet.
I am aware of tools like vnstat, iptraf, also iptables capabilities, but from what I understand, neither of these can do so per each IP address with which communication occurred. Port does not matter here.
Perhaps there is a smart way to parse tcpdump .pcap output? The application here would be to monitor anomalies from within a private network. I.e., if an unknown IP address seems to be receiving a large amount of data from within the network, it could mean an intrusion.