Who’s pinging my Linux server

Who’s pinging my Linux server

 

In this article i will show how to know monitor who is pinging my server with tcpdump Linux utility.

tcpdump packet analyzer will help us figure out the IP address where the ICMP requests come from. To monitor incoming ICMP echo requests type:

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

where eth0 is the name of the Ethernet adapter (in your case it can be other eth1, eth2.. ). If you don’t need resolve source hostname, you can add option -n and get source IP address. For example:

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

Example output who ping my server:

IP address where the requests come from

As you see on example incoming ping (ICMP) requests coming from 10.110.9.26

 

If you like what you are reading, please:

Buy me a coffeeBuy me a coffee

 

arstech

Leave a Reply

Your email address will not be published. Required fields are marked *