I have set up vagrant-dns but it's a shame I can't use the names from within my Vagrant VMs. (vagrant-dns sets up a nameserver on port 5300 on the host machine)
I found the resolver cookbook and it occurred to me I could maybe use that with Vagrant's port forwarding to make the vagrant-dns nameserver accessible from with the VM. It will need port forwarding because you can't specify different port number for nameservers in
I added this to my Vagrantfile:
config.vm.forward_port 5300, 53
...hoping that requests to 22.214.171.124 port 53 from the VM would thus hit the nameserver on the host machine.
I don't think it works and I have three questions:
- should Vagrant forwarded ports work 'both ways'?
- is it possible to somehow forward port 53 on the VM to 5300 on the host?
- is there some way to point the VM (running Ubuntu 12.04) to a nameserver on port 5300?