I have Windows installed on my laptop, connected to the router wirelessly with IP 192.168.1.5. My desktop is running Linux, connected to the same router (wired) with IP 192.168.1.2. When I do a ping from Windows to Linux, I get a response, but it doesn't work in the other direction. What could be the problem?
16 Answers
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.1From Linux:
$ ping 192.168.1.1If these work then it's highly likely that the Windows firewall is to blame here for blocking your ping attempts.
2Issue:
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:
- Go to Windows 10 settings
- Network & Internet
- Ethernet
- Click on connected adapter
- Finally check PC discoverable
Also you can select this option somehow globally in
- Control Panel
- Network and Internet
- Network and Sharing Center
- Advanced sharing settings
But it will not override settings for existing saved networks.
3check the windows firewall, that it allows ICMP
Does your linux distro have NETBIOS? when you ping another pc by name in your network, often it is not because the name is in the DNS server but instead broadcast by the other PC through NETBIOS.
For instance on most android phones you can not ping a windows machine by name for this reason unless the host name was added to the DNS server.
Open a command prompt (command.com, powershell) and paste in
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allowthat will open the firewall for incomping ICMP package, thus allowing pinging your windows machine from your linux machine.
Like @slm mention try to check your firewall. On windows 10. follow the steps:
1- windows settings
2- Network & Internet
3- Wifi
4- click on the name of the connected network
5- Configure firewall and security settings
6- Then say yes to the prompt
7- Turn off the firewall for the private network
8- Then try the ping again from your linux machine. Note: Choose Ethernet if you are connected with cable.
1