Why Do My ICMP Pings Stop Working When I Change Destination Ports?

April 21, 2026 2 answers
Asked by !visit the aquarium
I'm trying to understand why my ICMP pings are not working as expected. I have a firewall rule that allows communication between all my internal LANs over all ports and protocols, and the pings work perfectly. However, when I set the destination ports to specific numbers, the pings suddenly fail to go through, even though ICMP is still enabled. If I revert back to allowing all ports, the pings work again. From what I know, port numbers shouldn't affect ICMP pings, but I seem to be missing something here. I've also set up inbound and outbound network security groups (NSGs) just to rule that out, but the pings still don't go through. Any ideas?

Answers

hinge.pin!
When you mention changing destination ports, just a heads upโ€”ICMP doesnโ€™t actually use ports the way TCP/UDP traffic does. So, if you are trying to ping a specific port, it simply wonโ€™t work. Instead, ICMP operates at a different layer of the network stack and doesnโ€™t reference ports at all. I suggest using a tool like Wireshark to check what packets are being sent when you attempt to ping. Itโ€™ll give you a clearer picture of whatโ€™s happening.

!set the basket down: Got it! So, basically if my rule specifies ports, that's where things get tricky. I wasn't aware that ICMP isn't bound to port numbers. Thanks for clarifying!

Reply to this answer
stencil-30cm
To solve your issue, try creating two separate firewall rules: one solely for ICMP traffic and another for TCP/UDP traffic. This way, you can ensure that the ICMP traffic isnโ€™t being blocked when you set specific port numbers for other rules. That should fix the issue of your pings not going through!
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions