ipv6pinging

How to monitor for IPv6 address pings on a linux server


I know you can monitor for incoming pings on your server:

sudo tcpdump -vi enp2s0 proto \\icmp

But I just found out that it works only if the server is being pinged using its IPv4 address. When I try to ping it using its IPv6 address and ping6 command I don't seem to be getting any packets.

So the question is: how do you monitor your server when someone pings you using its IPv6 address.


Solution

  • ICMP (for IPv4) and ICMPv6 (for IPv6) are different protocols.

    To monitor IPv6 ICMP pings, you just have to specify ICMPv6 as the protocol:

    sudo tcpdump -vi eth0 icmp6