Trouble with server name resolution after changing Hosts file

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
Motoman
Posts: 3
Joined: 22. Feb 2019, 17:43

Trouble with server name resolution after changing Hosts file

Post 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?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Trouble with server name resolution after changing Hosts file

Post 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...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Motoman
Posts: 3
Joined: 22. Feb 2019, 17:43

Re: Trouble with server name resolution after changing Hosts file

Post 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.
Motoman
Posts: 3
Joined: 22. Feb 2019, 17:43

Re: Trouble with server name resolution after changing Hosts file

Post 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...
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Trouble with server name resolution after changing Hosts file

Post 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.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply