Unable to ping a Windows machine from Linux

This sounds like your Windows firewall is blocking ICMP packets is what the command ping is using to solicit responses from other computers on the network.

I would try to ping the WI-FI router from both systems to confirm that outbound is working against a 3rd machine (which it likely is, since you're getting IP addresses from the router).

Your router is likely to have the IP address 192.168.1.1 so I'd try pinging that.

From windows:

$ ping 192.168.1.1

From Linux:

$ ping 192.168.1.1

If these work then it's highly likely that the Windows firewall is to blame here for blocking your ping attempts.


Issue:

I had exactly this issue on Windows 10. I have my Windows 10 machine on 192.168.1.74 and the (Arch) Linux machine on 192.168.1.174. Pinging from windows to linux worked flawlessly, but otherwise it didn't.

Solution:

  • I tried Rafał Wądołowski's solution

    check the windows firewall, that it allows ICMP

    but it didn't work for me.

  • Then I recalled that when you first connect to network windows ask you if you want to be discoverable. And that was exactly my issue.

To fix the issue follow these steps:

  1. Go to Windows 10 settings
  2. Network & Internet
  3. Ethernet
  4. Click on connected adapter
  5. Finally check PC discoverable

Also you can select this option somehow globally in

  1. Control Panel
  2. Network and Internet
  3. Network and Sharing Center
  4. Advanced sharing settings

But it will not override settings for existing saved networks.


check the windows firewall, that it allows ICMP