Cannot ping a Windows 11 machine

10,200

Solution 1

After poking around I managed to enable ICMP responses on my Windows 11 machine:

Open Windows Defender Firewall and select Advanced Settings in the sidebar. Switch to Inbound Rules via the Getting Started page or the sidebar. Find the rule named "Core Networking Diagnostics - ICMP Echo Request (ICMPv4-In)" with Profile of "Private, Public" (unless you're on a corporate domain...). You can right-click the rule and Enable Rule.

You might also want to do the same for the IPv6 version named "Core Networking Diagnostics - ICMP Echo Request (ICMPv6-In)". I don't know why Microsoft decided to disable these by default.

Solution 2

In addition to Morphit's answer there is an additional option (if you want to use file and printer sharing on your network):

  1. Check your connection classification (private, public, domain).

  2. Go to Control Panel -> Network and Sharing Center -> Change advanced sharing settings. Turn on file and printer sharing, make sure that you choose correct network profile.

This will automatically activate the appropriate rules in Windows Defender Firewall, e.g. File and Printer Sharing (Echo Request - ICMPv4-In). This will have the same effect as activating the rule Core Networking Diagnostics - ICMP Echo Request (ICMPv4-In) directly.

Please note: this will enable people on your LAN to access files and printers if you turned on sharing. If you don't want to use it, go with Morphit's answer.

Share:
10,200
Francesco
Author by

Francesco

Updated on September 18, 2022

Comments

  • Francesco
    Francesco almost 2 years

    I'm trying to ping my Windows 11 machine from a Linux device. Here's what I've tried so far:

    • Disabling Windows Defender Firewall
    • Enabling inbound rules from the Advanced Options
    • Restoring firewall & network settings
    • Uninstalling VPNs

    I'm 99% sure the issue is in the Windows machine since they can both ping the router and I can also successfully ping other Windows devices from Linux.

    Am I missing something?

    Edit: I don't think it's a firewall problem since I can't ping my Windows device regardless of the status of the Defender Firewall.

    Edit 2: I don't know if it's related to this problem, but:

    • Ping to localhost: Successful
    • Ping to 127.0.0.1: General failure
    • Ping to 192.168.x.x (Windows IP): Timeout
    • Ping to 192.168.x.x (Other devices): Successful
    • Andrew Morton
      Andrew Morton over 2 years
      Are the Windows 11 and Linux machines connected via a simple switch or via something that can filter packets? Can you ping the Windows 11 machine from other Windows machines? Can you ping the other machines from the Windows 11 machine?
    • Francesco
      Francesco over 2 years
      Windows connection is wired while Linux is connected through Wi-Fi. I cannot ping Windows from any device while I can ping other hosts (including the router) from the Windows machine.
    • Andrew Morton
      Andrew Morton over 2 years
      If the subnet mask is set correctly, you could reset TCP/IP.
    • Francesco
      Francesco over 2 years
      That didn't work. I also updated the question with some interesting outputs of ping commands.
    • Andrew Morton
      Andrew Morton over 2 years
      You could use Wireshark to see if the ping packets are getting to the W11 machine.
    • Francesco
      Francesco over 2 years
      Using Wireshark I can see the ICMP packets reaching the W11 machine, but it seems like it's not sending a reply. I still think it's a firewall-related issue, but disabling Windows Defender/enabling the rule for ICMPv4-in doesn't do anything
  • Francesco
    Francesco over 2 years
    Still nothing. The home network is recognized as Private, the device is discoverable and printer/file sharing is enabled.
  • John
    John over 2 years
    Try allowing Remote connections in Advanced System Properties. That should not prevent Ping but try ti. Also try resetting Windows Firewall to default settings.
  • Francesco
    Francesco over 2 years
    Still getting 100% of packet loss with Remote access connections enabled.
  • Community
    Community over 2 years
    As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
  • Francesco
    Francesco over 2 years
    They both have a static IP and are in the same subnet.
  • John
    John over 2 years
    I added a section to my answer to enable Ping (off be default). I could already share files and RDP to the Windows 11 machine.
  • Francesco
    Francesco over 2 years
    Still nothing. I added an interesting section about pinging other hosts from my Windows machine. That may help.
  • olex
    olex over 2 years
    This solved the same issue for me, thanks! Really weird how they decided to leave it disabled all of a sudden, even for networks marked as "Private".
  • lucky.expert
    lucky.expert over 2 years
    This worked for me as well. For me, I have a client-server application where the server was Win 11. The client was able to successfully connect to the database on the server but after a while it would freeze up. When it was frozen I noticed I couldn't ping the Win 11 computer. So it is almost as if the Win 11 allowed connections for a bit but then shut off access. This fixed seems to have fixed it for good though.
  • Toto
    Toto over 2 years
    OP says in question that they use “Windows Defender Firewall”
  • tibbius
    tibbius over 2 years
    Yes, but after I came here looking for solution and tried messing around with Windows Defender Firewall, I realized that I had McAfee installed over it. Seems like someone else might have the same scenario, so a post in the same thread seemed like it might be helpful.
  • Admin
    Admin almost 2 years
    I had to enable the corresponding outbound rules as well, in addition to the inbound rules.