kushpf
kushpf

Reputation: 1098

Cannot ping localhost but can access through browser

I am using wamp on my Win 7 laptop. localhost and 127.0.0.1 is accessible from the browser (Chrome) but when I'm try to run ping localhost or ping 127.0.0.1 from the command prompt, I'm getting timeout.

enter image description here

I have a few virtual hosts created at wamp too, and I've added them to hosts file, and they too are accessible from browser but ping fails from cmd.

Also, running ipconfig doesn't show anything about the wamp localhost. The other ips that I get at ipconfig are getting pinged. Lastly, I cannot access my localhost using the ip on other devices connected to Laptop wifi hotspot created by mHotspot.

Someone please explain this behaviour to me, and help me access my localhost from my other devices. Thanks!

Upvotes: 0

Views: 1388

Answers (1)

RiggsFolly
RiggsFolly

Reputation: 94672

It sounds like your TCP stack is in some way corrupted.

This may clear the issue

Open a command prompt as Administrator and Run

netsh winsock reset
netsh winsock reset catalog
netsh int ip reset reset.log
netsh int ipv4 reset reset.log
netsh int ipv6 reset reset.log
ipconfig /flushdns

Reboot if necessary

Try ping again

Upvotes: 1

Related Questions