Ping to Windows 10 not working if "file and printer sharing" is turned off?

Because the File and printer sharing settings include the ability to deny/allow ICMP traffic. You can actually see this by navigating to the following:

  1. Click the Start button
  2. Search for Windows Firewall
  3. Select Advanced Settings on the left
  4. In the left pane select Inbound Rules
  5. In the right pane look for the rules titled File and Printer Sharing (Echo Request - ICMPv4-In)

(Source)

You can see an example from my laptop (with File and printer sharing turned on) directly below:

Windows Firewall

Taking it a step further, if you want to leave File and printer sharing off but still allow "pings," you can enable the appropriate rules shown within the red box in the picture.


I had issues ping-ing a Windows 10 VM, even if I turned on the file and printer sharing rule.

So I added the following:

netsh advfirewall firewall add rule name="ping" protocol=ICMPV4 dir=in action=allow

Warning: this command will apply the rule to the Private, Public, and Domain network profiles.