I am using a Raspberry Pi 3B as a bridge between WiFi and another router in the network. My goal is to log all traffic (UDP and TCP) that's being sent by a connected device, such as a phone or a voice assistant. Not just metadata, but the actual packet contents need to be stored, ideally on an external hard drive.
My access point (using hostapd and dhcpcd) is already set-up and working. So how could I accomplish this?