Skip to main content
Tweeted twitter.com/super_user/status/981685687803052032
replaced http://serverfault.com/ with https://serverfault.com/
Source Link

I'm trying to set up Windows 8.1 virtual machine through VirtualBox for testing a server running on my Mac (running Yosemite 10.10.3). VirtualBox sets up a the IP 10.0.2.2 to point to the host machine's localhost (where the server is running). To connect to a remote server with fairly specific CORS constraints, I need to point the guest OS's localhost to that address. I've tried adding an entry to the `C:\Windows\System32\Drivers\etc\hosts file, but while it works for other strings (like 'test' and 'foo') it doesn't work for localhost. I've run across a couple threads (http://serverfault.com/questions/4689/windows-7-localhost-name-resolution-is-handled-within-dns-itself-whyhttps://serverfault.com/questions/4689/windows-7-localhost-name-resolution-is-handled-within-dns-itself-why) that obliquely refer to this functionality being moved into the DNS resolver, but not how to change it beyond saying that it's in group policy somewhere. Can anyone tell me how to set the localhost of the Windows 8.1 VM to a custom address?

I'm trying to set up Windows 8.1 virtual machine through VirtualBox for testing a server running on my Mac (running Yosemite 10.10.3). VirtualBox sets up a the IP 10.0.2.2 to point to the host machine's localhost (where the server is running). To connect to a remote server with fairly specific CORS constraints, I need to point the guest OS's localhost to that address. I've tried adding an entry to the `C:\Windows\System32\Drivers\etc\hosts file, but while it works for other strings (like 'test' and 'foo') it doesn't work for localhost. I've run across a couple threads (http://serverfault.com/questions/4689/windows-7-localhost-name-resolution-is-handled-within-dns-itself-why) that obliquely refer to this functionality being moved into the DNS resolver, but not how to change it beyond saying that it's in group policy somewhere. Can anyone tell me how to set the localhost of the Windows 8.1 VM to a custom address?

I'm trying to set up Windows 8.1 virtual machine through VirtualBox for testing a server running on my Mac (running Yosemite 10.10.3). VirtualBox sets up a the IP 10.0.2.2 to point to the host machine's localhost (where the server is running). To connect to a remote server with fairly specific CORS constraints, I need to point the guest OS's localhost to that address. I've tried adding an entry to the `C:\Windows\System32\Drivers\etc\hosts file, but while it works for other strings (like 'test' and 'foo') it doesn't work for localhost. I've run across a couple threads (https://serverfault.com/questions/4689/windows-7-localhost-name-resolution-is-handled-within-dns-itself-why) that obliquely refer to this functionality being moved into the DNS resolver, but not how to change it beyond saying that it's in group policy somewhere. Can anyone tell me how to set the localhost of the Windows 8.1 VM to a custom address?

Post Migrated Here from serverfault.com (revisions)
Source Link

Override localhost IP Adress in Windows 8.1

I'm trying to set up Windows 8.1 virtual machine through VirtualBox for testing a server running on my Mac (running Yosemite 10.10.3). VirtualBox sets up a the IP 10.0.2.2 to point to the host machine's localhost (where the server is running). To connect to a remote server with fairly specific CORS constraints, I need to point the guest OS's localhost to that address. I've tried adding an entry to the `C:\Windows\System32\Drivers\etc\hosts file, but while it works for other strings (like 'test' and 'foo') it doesn't work for localhost. I've run across a couple threads (http://serverfault.com/questions/4689/windows-7-localhost-name-resolution-is-handled-within-dns-itself-why) that obliquely refer to this functionality being moved into the DNS resolver, but not how to change it beyond saying that it's in group policy somewhere. Can anyone tell me how to set the localhost of the Windows 8.1 VM to a custom address?