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
The docs say: “All methods in the dns module use C-Ares except for
dns.lookup
which usesgetaddrinfo
(3) in a thread pool.”I wonder, though, why C-Ares is not working properly here. If your computer changes networks, it seems to me caches should be flushed, and subsequent DNS requests would go to the new DNS server. ...Unless DNS isn’t expected to work when you’re connected to a VPN?