Packets that are returned when TTL expires are not recieved
See original GitHub issue
It seems nothing is recieved when we call RecvFrom: https://github.com/Killeroo/PowerPing/blob/615f78e441a9c5f523f68a34aac60b69e004b75b/src/PowerPing/Ping.cs#L301
I tried changing responseEP to be IPAddress.Any and tried remove the guards around the socket but at the socket level it doesn’t seem to be recieving the returned packet.
The returned packet seems to be in the correct format, could be a problem with the source address of the packet being different from what we expect (but I doudt this because Destination unreachable packets normally come from hosts that we don’t expect and they are normally recieved. Needs more investigation, also returned packet contains a copy of the original packet, might be interesting to see how that should be handled. Listen function doesn’t seem to see the returned packet either…
This fix is required to make traceroute work (https://github.com/Killeroo/PowerPing/issues/1).
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)

Top Related StackOverflow Question
You won’t believe it! If I add a new firewall rule to Windows to allow all ICMP packets (inbound) it works immediately.
Seems to me, ping.exe and traceroute.exe has own rules for inbound ICMP package. So we cab see it in Wireshark, but the firewall drop the answer if it would go to a not-well-known program which is on the exception list of the firewall.
@Meister1977 Your solution does seem to work, annoyingly I can’t seem to restrict the rule to just PowerPing, it only works when ICMPv4 packets for any program is specified. I think this might have something to do the way the .NET programs are actually run, I actually tried to only allow different .NET dlls but that didn’t work either.
I am a bit torn about what to do, adding a blanket inbound rule to allow all ICMPv4 traffic through the firewall is possible and does work but it might be kind of rude to do this without user consent and limiting the inbound rule to just PowerPing doesn’t seem possible.
I will add these changes in a seperate branch and might implement a yes no option to ask users if they want to open firewall access when a user tries to use traceroute or ttl commands.