How to monitor internet traffic of IoT devices?

Hi all,

I was wondering what would be a good way to monitor the internet traffic of my HA devices. I’ve seen some people online doing it using “Google WiFi”, but for that it seems like I need a Google WiFi router, which I don’t.

My setup:
DD-WRT Router (Archer C7)
Proxmox homeserver running HAOS in a VM.

Ideally I’d like to run some kind of network monitor in a VM or (preferably) an LXC container running Debian- or Ubuntu server. But an online search didn’t really clear things up for me.

My goal would be to see how much data each IoT device (specifically the Tuya ones) downloads and uploads from/to the interwebz. And ideally also where it uploads to or downloads from.

Thanks in advance for all suggestions!

Edit:
From what I have learned so far, it seems like I would have to move all IoT devices to a VLAN in DDWRT, and somehow point that VLAN to a proxy server running on a Linux VM or container. This proxy server should then be able to log all traffic per device.
Could someone confirm if this is the way to go? And maybe point me into the right direction accomplishing this? Or suggesting proxy server software that can do this? Thanks!

https://wiki.dd-wrt.com/wiki/index.php/Network_traffic_analysis_with_netflow_and_ntop

Also consider just blocking devices from the internet when possible.

You might be able to set up the correct log settings in your router and then send the info to a syslog server.
A syslog server is a special standard server made for storing log messages and there should be plenty of tools to process the data you need as long as your router provide that in its log messages.

Thanks! This seems exactly what I’m looking for. Running nTop on a Debian LXC and configuring DDWRT to export traffic data to it.

I’ll give it a try!

Blocking WAN access is indeed something I’d also like to do. I guess that is done by blocking the entire “IoT VLAN” from WAN access?
Or can I also do it per device (which would make it easier to pair new devices with Tuya first, and then getting the local key before blocking its WAN access).

Either. per device or entire vlan
As and example, I block my cameras from sending outbound requests but allow inbound and responses to inbound. So the cameras cannot search for other devices on network or download but HA can access the camera feed and ping device. I dont use dd-wrt but I’m sure this is possible.

I installed nTopng in a LXC container. But I noticed I can’t use rFlow on the ddwrt router, because its not the main router (forgot to mention this). I connected it to the main modem/router to function as an extra AP to extend the WiFi range to the second floor.

I guess to make this work, I would have to put the main (ISP) modem/router (Connectbox) in bridge mode. And use the DDWRT router as the main router. But then I lose the WiFi AP on the ground floor…

Am I correct?

You are sadly correct.
If the router is not the main one, then it will not see the traffic that is not going through it.