Can’t ping my host from a CentOS linux server although I can ssh to the linux server

After creating a CentOS server using Hyper-V on my Windows 10 host. I set up an internal switch to allow communication between the host and the VM.

The problem is that I can’t ping the host from the VM although I can ping the VM from the host. I can ssh to the VM normally from the host and the VM can use curl to request files from the host.

I have tried to allow ICMP traffic (ping) but it didn’t work

sudo firewall-cmd --zone=public --add-icmp-block=echo-request --permanent

I have also tried tcpdump -i eth1 to check if the request passes and I found this output when pinging from the linux server to the host

tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), snapshot length 262144 bytes
07:44:57.073024 IP 10.0.0.1.55466 > 239.255.255.250.ssdp: UDP, length 175
07:44:58.086894 IP 10.0.0.1.55466 > 239.255.255.250.ssdp: UDP, length 175
07:44:59.087701 IP 10.0.0.1.55466 > 239.255.255.250.ssdp: UDP, length 175
07:45:00.100374 IP 10.0.0.1.55466 > 239.255.255.250.ssdp: UDP, length 175
07:45:10.481566 IP localhost.localdomain > 10.0.0.1: ICMP echo request, id 10, seq 1, length 64
07:45:11.497575 IP localhost.localdomain > 10.0.0.1: ICMP echo request, id 10, seq 2, length 64
07:45:12.521623 IP localhost.localdomain > 10.0.0.1: ICMP echo request, id 10, seq 3, length 64
07:45:13.545307 IP localhost.localdomain > 10.0.0.1: ICMP echo request, id 10, seq 4, length 64
07:45:15.657420 ARP, Request who-has 10.0.0.1 tell localhost.localdomain, length 28
07:45:15.667394 ARP, Reply 10.0.0.1 is-at 00:15:5d:dc:19:58 (oui Unknown), length 28

And I got this output when pinging from the host to the server

07:45:37.455817 IP 10.0.0.1 > localhost.localdomain: ICMP echo request, id 1, seq 14420, length 40
07:45:37.455896 IP localhost.localdomain > 10.0.0.1: ICMP echo reply, id 1, seq 14420, length 40
07:45:38.471134 IP 10.0.0.1 > localhost.localdomain: ICMP echo request, id 1, seq 14422, length 40
07:45:38.471210 IP localhost.localdomain > 10.0.0.1: ICMP echo reply, id 1, seq 14422, length 40
07:45:39.485028 IP 10.0.0.1 > localhost.localdomain: ICMP echo request, id 1, seq 14424, length 40
07:45:39.485139 IP localhost.localdomain > 10.0.0.1: ICMP echo reply, id 1, seq 14424, length 40
07:45:40.499389 IP 10.0.0.1 > localhost.localdomain: ICMP echo request, id 1, seq 14426, length 40
07:45:40.499509 IP localhost.localdomain > 10.0.0.1: ICMP echo reply, id 1, seq 14426, length 40
07:45:42.030437 ARP, Request who-has localhost.localdomain (00:15:5d:dc:19:b5 (oui Unknown)) tell 10.0.0.1, length 28
07:45:42.030453 ARP, Reply localhost.localdomain is-at 00:15:5d:dc:19:b5 (oui Unknown), length 28
07:45:42.793369 ARP, Request who-has 10.0.0.1 tell localhost.localdomain, length 28
07:45:42.796372 ARP, Reply 10.0.0.1 is-at 00:15:5d:dc:19:58 (oui Unknown), length 28

The problem doesn’t affect me too much as I can freely ssh to the server and the server can freely curl data from the host, but I want to know the cause of this.