I run a web server locally on my Mac. I use Virtualbox to run various Windows guest OSes thanks to http://www.modern.ie/virtualization-tools The server on my host machine is running WordPress in a multi-site set-up and requires a host name in the request to serve up the correct site. IP address URLs won't work.
The Virtualbox network adapter is in NAT mode and I found the IP address of my host machine. I can get everything to work by editing the hosts file in the Windows guest OS. The entry looks something like this:
Then in Windows if I browse to server.dev everything works as it should.
So my question is... Can I set it up so I don't need to edit the hosts file of my guest OS everytime the IP address of my host machine changes? Something like a reverse port forward so I could set a hosts file entry like so...
and Virtualbox would listen for a request to 10.1.99.99 and change it to 127.0.0.1 ?