I have one Windows 10 computer on a local network.

When I try to ping the Windows 10 machine from some other computer, it fails (Request timed out). From the Windows 10 machine, I can ping other devices with no problems.

I found out that if I go in Control Panel to the "Advanced sharing settings" and I turn on "File and printer sharing," the ping to this machine works normally.

My question is, WHY?

Why doesn't the ping work if "File and printer sharing" is turned off (on the pinged machine)? How is that related to the ping reply? A machine should still reply to a ping even if it does not share file/printer resources, or did I miss something?


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)


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.

| improve this answer | |
  • tnx! so basically, in windows, ICMPv4-In is directly connected with "file and printer sharing"? I cannot allow ICMPv4-In without "file and printer sharing" ? – lucidBug Oct 22 '16 at 23:36
  • *without turning ON "file and printer sharing" – lucidBug Oct 22 '16 at 23:38
  • 1
    Settings that control ICMP traffic are included within the File and printer sharing functionality, but as I mentioned at the end of my answer, you should be able to individually enable the appropriate rules within Windows Firewall to allow ICMP traffic. – Run5k Oct 22 '16 at 23:40
  • But if I enable the rule (the one in the red box), then this is same like I put ON "file and printer sharing"? or not? – lucidBug Oct 22 '16 at 23:44
  • a ok, if I keep the others off (SMB, Spooler, LLMNR) then nothing is shared. Right? – lucidBug Oct 22 '16 at 23:47

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.

| improve this answer | |

Windows uses firewall presets, depending on your network type: Public, Private or Domain. Default is Public. In the Public preset, the firewall is set "tighter"; It blocks more, e.g. ping requests. If you turn on File and printer sharing, Windows will change your network type (= firewall preset) to Private. The firewall will be more open, allowing ping requests.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.