Page 1 of 1
Trouble with server name resolution after changing Hosts file
Posted: 22. Feb 2019, 17:49
by Motoman
So I have a Windows 10 VM on a Mac host. I need to set an IP address to see a server that I have running on the Mac side from the Windows side, and in fact have done this before on this exact setup without issue...
Now though for some reason when I modify the Hosts file for the new server, like:
192.168.0.21 blah.blah.whatever. com (without the space before "com")
It doesn't resolve to the 192.168.0.21 IP - it resolves to 127.0.0.1.
I have a NAT and a host-only adapter on the VM. Don't have this problem for other servers that I had to set up in the Hosts file - for some reason this is only happening to this one, and nothing I do to try to re-do it or fiddle with any settings seems to change the fact that it keeps resolving as 127.0.0.1. Anyone have any ideas?
Re: Trouble with server name resolution after changing Hosts file
Posted: 22. Feb 2019, 17:53
by socratis
Why is this a VirtualBox question? How you set your 'hosts' file on your OSX? I don't get it... Just because an OS/program that runs in the context of VirtualBox has a problem, it doesn't make it a VirtualBox problem necessarily. You're having an issue that has most probably nothing to do with VirtualBox, so my suggestion would be to treat it as such, as a native problem with the OS or the application of the guest.
What are the IPs on the server? And does it have a complete URN? With a .com at the end? For real?
And what are you trying to achieve by the name resolution on your host? SSH? A webserver? Other?
BTW, moving from "Windows Guests" to "OSX Hosts". Your guest is of no importance...
Re: Trouble with server name resolution after changing Hosts file
Posted: 22. Feb 2019, 18:03
by Motoman
I...am sorry if this question offended you somehow.
The reason I posted it in the Windows guest forum is because the necessary changes to the Hosts file, and the resolution of the server name are on the Windows side.
What are the IPs on the server? And does it have a complete URN? With a dot com at the end? For real?
The IP that the server name needs to resolve to is the IP on the Mac's wifi adapter, which is the 192.168 IP noted.
Yes, it's a complete URN. With a dot com at the end. For real. I already have 4 other such server names listed in the Hosts file on this Windows VM that resolve as intended.
And what are you trying to achieve by the name resolution on your host? SSH? A webserver? Other?
In this case, I have a server running in a Docker container on the Mac that needs to resolve to that 192.168 IP.
Re: Trouble with server name resolution after changing Hosts file
Posted: 22. Feb 2019, 18:06
by Motoman
Also, I have other coworkers who have the exact same setup and have no issues with their setups, and we can't see what the difference is between the setups...
Re: Trouble with server name resolution after changing Hosts file
Posted: 28. Feb 2019, 03:00
by socratis
Motoman wrote:I...am sorry if this question offended you somehow.
What??? Noooo, not at all, not even close...
Motoman wrote:In this case, I have a server running in a Docker container on the Mac
Hmm... Docker is a program that relies on VirtualBox, but modifies its configuration files in unknown ways to us, and with unknown consequences,
especially the networking part. It is not supported on these VirtualBox forums/channels, they have their own
Docker support channels. If you are having this problem with a standalone version of VirtualBox
(after a complete uninstallation of Docker), then we can continue this discussion.