Ping to Windows 10 not working if "file and printer sharing" is turned off?
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Cool Puzzler LoFi
--
Chapters
00:00 Ping To Windows 10 Not Working If &Quot;File And Printer Sharing&Quot; Is Turned Off?
00:47 Accepted Answer Score 56
01:40 Answer 2 Score 18
01:59 Answer 3 Score 4
02:52 Answer 4 Score 1
03:36 Answer 5 Score 1
04:34 Thank you
--
Full question
https://superuser.com/questions/1137912/...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#windows #networking #windows10 #networkshares #ping
#avk47
ACCEPTED ANSWER
Score 56
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:
- Click the
Start
button - Search for
Windows Firewall
- Select
Advanced Settings
on the left - In the left pane select
Inbound Rules
- 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:
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.
ANSWER 2
Score 18
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.
ANSWER 3
Score 4
"File and Printer Sharing" are a group of firewall rules, some of which also enable answering to the incoming ICMP echo requests sent by ping
.
However, to enable ping
only, you could also enable another pre-configured group of rules named "Core Networking Diagnostics".
These can all be enabled on the command-line, using netsh
. The commands are quite cumbersome, but can be easily copy/pasted to re-use on other machines.
So, to enable ping
only, enable the "Core Networking Diagnostics" group:
netsh advfirewall firewall set rule group="Core Networking Diagnostics" new enable=yes
To enable "File and Printer Sharing", which will also enable ping
:
netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=yes
And to list all pre-configured inbound rules into a "firewall.txt" file in your user directory :
netsh advfirewall firewall show rule name=all dir=in > $HOME\firewall.txt
ANSWER 4
Score 1
Often the issue can be fixed by moving your interface from PUBLIC to PRIVATE.
Windows assigns (or asks you to assign) network interfaces to either the PUBLIC or PRIVATE network profile. The firewall in windows is configured to allow pings from devices connecting via interfaces in the PRIVATE profile, but not from devices connecting via interfaces in the PUBLIC profile.
You can change the firewall configuration, but it may be easier to move your network interface (LAN, WIFI, etc) from PUBLIC to PRIVATE. This should do the trick.
As an example, for a WIFI interface, click on the wifi icon in the task bar and select the WIFI and properties. Then change the network profile from PUBLIC to PRIVATE.
ANSWER 5
Score 1
I know I am EXTREMELY late with my response to this but this is one of the pages that I was referred to when trying to resolve a similar issue. I was trying to upload files to a Windows 10 Home computer and if the firewall was ON, I was not able to upload files OR ping the remote Home computer. Everything worked fine if I turned off the firewall. With Windows 10 Home the Guest and a lot of the ability to remotely access Home is turned off by default. Even turning on File and Printer Sharing did not fix MY problem.
The Question asked here is "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?"
They are linked together under the rules for ICMP. In my case I had to create a Custom Rule that allowed ICMPv4 for Ping and another custom rule that allowed ICMPv6 for Ping. Once I allowed a response to Ping using the custom firewall rule, the Home computer allowed me to access the shared folders and upload files.
Hope this helps anyone else with this problem.