Chrome resolves address to different IP than ping

A coworker is having an issue where a certain XHR call is not completing on their computer. The rest of us are unable to repro the issue. The only differences between their computer and ours:

  • Because of the special Internet connection they use, they need to connect through a corporate proxy
  • When examining the XHR call in Chrome's "Dev Tools --> Networking" tab, the hostname resolves to a different IP address

The "wrong IP" appears to be the issue - when I force the hostname to resolve to that IP on my machine, I see the same problem.

The weird thing is, doing a ping on their machine shows it resolving to the correct IP!

Here is what I've tried:

  • Changing their DNS to 8.8.8.8
  • Forcibly adding the correct address to their hosts file(!?!)
  • ipconfig /flushdns
  • chrome://net-internals/#dns -> Flush
  • Restart their PC

None of it made a difference - Chrome still resolves the call to the wrong address, while ping resolves to the correct address. How is this possible!?

My guess would be it has something to do with the proxy, but I don't see how that could true, since using the hosts file should prevent it from even sending out a DNS request, right?


Solution 1:

"How is this possible?"

The chrome proxy is also proxying DNS requests for the chrome browser. As a result, all of the requests made by chrome are being resolved on the proxy system, which is providing the wrong IP address.

All of your local DNS modifications are being ignored by chrome, as chrome DNS lookups are being handled by the proxy.

The proxy doesn't effect the ping command, so that resolves with local (correct) DNS response.

Have the user try disabling the proxy, or you can try using their proxy to confirm or deny this explanation.