baicai

白菜

一个勤奋的代码搬运工!

How to know who is pinging me?

tcpdump is the most powerful and widely used command-line packet sniffer (packet analyzer) tool available on Linux.

In the terminal application of the computer you want to monitor:

sudo tcpdump -i ethX icmp and icmp[icmptype]=icmp-echo

Options:

-n avoid a (potentially slow) reverse DNS query
−i interface
icmp[icmptype]=icmp-echo    To print all ICMP packets that are echo requests/replies

It will start listening on ethX and wait for incoming packets.

Example: I have 2 PCs, Win7 with IP 192.168.0.8 and Ubuntu with IP 192.168.0.57. It will monitor incoming packets:
On Win7:

ping 192.168.0.57

On Ubuntu:

tcpdump -i eth0 icmp and icmp[icmptype]=icmp-echo -n

Reference: nixCraft[1]

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.