I have a hardware device that hosts two separate TCP modules. One is for receiving commands from other machines, while the other is a TCP stream server that sends data based on the commands received. (It’s not my hardware. I can’t open or change it. I know the design is kinda stupid.)
The issue is, when I try to use tcpdump
to listen to the TCP stream, no packets are captured.
I use the sudo tcpdump -i eth0 -n port 9101
command. It simply lists:
0 packets captured;
0 packets received by filter;
0 packets dropped by kernel.
However when I use netcat nc -v <ip address> 9101
then I get the full stream in real time. The problem is I want to capture the stream to a file in binary format. That’s why I’m going with tcpdump.
Any idea how I can solve this?