Question

My computer has only one network card. I have a program listening on one port. I intend to send one packet on the same machine, my program can receive the packet. I can't capture the packet by tcpdump on the machine which my program is running on.

If I send packet from another machine, tcpdump can capture the packet.

Was it helpful?

Solution

If i understand you correctly, you send the packet from a machine to itself. If so, you need tcpdump on the loopback interface. e.g.

tcpdump -i lo
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top