I'm pulling company data from a file server, simon.int
(dataDomain). While connected to our network via ethernet cable, or our internal wireless network I can access the file server via both browser, and via Node.js dns.resolve
. If I'm outside our network I can't connect via either browser or Node's dns.resolve
method (as expected). The problem arises when I connect to our internal network via VPN. I can open simon.int
in a browser, I can ping it, etc. yet dns.resolve
returns an error when trying to connect to it.
I feel that this is a bug, but I can't find documentation of any sort of expectation of how it should work. I'm trying to determine whether I should report it as a bug, or if my expectation of it is incorrect. I ended up getting around it by making a jQuery AJAX HEAD request just to see if the server was available or not (works great).
I'd love input on this subject, or a pointer in the right direction.
A fellow developer suggested that perhaps it amounted to the user that Node was running as vs "me" accessing simon.int via ping or the browser.
FYI my version of Node:
$ node --version
v0.10.26
I suspect this is a bug.
C-Ares has to query Windows to ask “What DNS server should I use?” which most likely ends up here: https://github.com/bagder/c-ares/blob/master/ares_init.c#L914
Maybe it's not correctly interpreting the result when VPN is enabled, and connecting to the wrong DNS server as a result. Wireshark would tell the story, I bet.