I had to investigate the network traffic of an ethernet-bound device. My plan was to visualize the data sent and received on my laptop using wireshark or similar tools.
Surpriningly this is quite simple: I ordered an USB-Ethernet Adapter, plugged it into my Linux Laptop. After that ifconfig did show a new ethernet device. Plug the the two adapters in between the cable you want to captutre the traffic on.
To enable the laptop to capture the pakets you have to configure a bridge, which can be done via this script:
#!/bin/sh iface0=eth0 iface1=enx00e04c534458 ifconfig $iface0 -arp promisc 0.0.0.0 up ifconfig $iface1 -arp promisc 0.0.0.0 up brctl addbr br0 brctl addif br0 $iface0 brctl addif br0 $iface1 ifconfig br0 -arp promisc 0.0.0.0 up
iface0 is my builtin ethernet plug, iface1 the usb adapter. brctl needs bridge-utils to be installed on your system.
After executing the script wireshark can be started and all the traffic can be captured using the interface br0