lsconntrack prints aggregated connections tracked by Linux netfilter conntrack and enables you to simply grasp the network relationship between localhost and other hosts.
Download from https://github.com/yuuki/lsconntrack/releases .
# Prints active open connections from localhost to destination hosts.
lsconntrack --active
RemoteAddress:Port FQDN Inpkts Inbytes Outpkts Outbytes
10.0.1.10:3306 db001.private.host. 5521792 123258667 5423865 282041045
10.0.1.11:3306 db002.private.host. 58800 3062451 58813 3061627
10.0.1.20:8080 proxy001.private.host. 123 169638 62 3580
...# Prints passive open connections from destination hosts to localhost.
lsconntrack --passive
RemoteAddress:Port FQDN Inpkts Inbytes Outpkts Outbytes
10.0.2.10:80 nginx001.host.h. 23 6416 25 25460
10.0.2.11:80 nginx002.host.h. 38 8574 34 32752
...lsconntrack --active 3306 11211cat /proc/net/nf_conntrack | lsconntrack --stdin --active 3306 11211conntrack | lsconntrack --stdin --active 3306 11211lsconntrack --json --active 3306 11211