4

I'm using dnsmasq on the Mac (OS X 10.7) to facilitate local development (along with MAMP), with just this pretty simple config:

[dnsmasq.conf]
address=/dev/127.0.0.1

.. pretty darn simple. All my *.dev domains resolve to 127.0.0.1 (localhost). Together with:

[DNS Servers]
127.0.0.1
8.8.8.8
8.8.8.4

..as my Mac's DNS settings, this works a treat.

But then I also have a pretty stock Windows 7 SP 1 VM running in VirtualBox (latest). It uses 10.0.2.* as its IP subnet within Windows. At the moment I have to use a service like http://xip.io + another hostname alias to use my *.dev sites in Windows, e.g:

[ if Mac's local IP is 192.168.1.50 ]
something.dev.192.168.1.50.xip.io

..and I need to have this extra ServerAlias manually set up in my Apache config, and keep it updated each time my local IP address changes.

Is there any way I can set up either dnsmasq, VirtualBox, or my Windows IP settings (or a combination of these) so that I can use my .dev hostnames (e.g. http://something.dev/) directly from Windows?

Jonny Nott
  • 328
  • 3
  • 14

2 Answers2

2

Try this: https://github.com/stackia/DNSAgent

It has functions similar to Dnsmasq server= and address=

and a rule converter: https://stackia.github.io/masq2agent/

Stackia
  • 2,110
  • 17
  • 23
1

If you mean that you want to run something like dnsmasq on your windows vm then I share your pain. I have been trying to get something setup on a windows host to do wildcard localhost sites without doing something like xip.io but I am having problems getting it to work. Dnsmasq on the osx machine I have was a breeze, but trying to get Acrylic DNS to work on windows the same way hasn't worked. I do have it running as a local caching DNS, and it should be doing the wildcard part, but having problems getting over the final steps.

Check it out. Looks neat, free, and a dnsmasq alternative on windows. And if you get it working post your results! I'll do the same if I can get it going.

noeldiaz
  • 906
  • 5
  • 5