You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 1, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 1, 2021. It is now read-only.
DNS (SRV records) lookups fail inside docker container using boot2docker DNS server. #627
Ok, I think this is because the boot2docker VM is using the virtualbox host based resolver to do it's DNS lookups, this server doesn't seem to support SRV requests. If you switch to the plain DNS proxy then the lookups start working again:
VBoxManage modifyvm "boot2docker-vm" --natdnshostresolver1 off
VBoxManage modifyvm "boot2docker-vm" --natdnsproxy1 on
Is there a reason for preferring the resolver over the proxy?
@tianon That works for me, but the tradeoff of no using the host resolver or proxy is that people running boot2docker on laptops may end up with broken DNS inside their VMs when they move between networks that have different DNS resolves setup I don't believe the change in DNS settings gets pushed through to the VM.
No DNS proxy -- Works well without issues except for people who use boot2docker on laptops and move them across networks with different DNS servers (eg home / work).
NAT DNS Host Resolver -- The current setting but doesn't appear to support SRV records (feature request for Virtualbox)?. Does however hide the upstream DNS so travelling laptops work fine.
NAT DNS Proxy -- An alternative setting that hides the upstream DNS from the VM so laptops work fine and DNS SRV records also work here.
Indeed. Thanks for the summary @buckett. I'll work up a PR to switch to the DNS Proxy and we can always switch over to no proxy if it turns out there are other glaring issues with the proxy.
Activity
buckett commentedon Nov 13, 2014
Ok, I think this is because the boot2docker VM is using the virtualbox host based resolver to do it's DNS lookups, this server doesn't seem to support SRV requests. If you switch to the plain DNS proxy then the lookups start working again:
Is there a reason for preferring the resolver over the proxy?
http://www.virtualbox.org/manual/ch09.html#nat-adv-dns
SvenDowideit commentedon Nov 14, 2014
this may be documented in the original b2d repo PR's (when the cli was a script) - I can't recal atm
buckett commentedon Nov 14, 2014
This may well catch quite a few people out as DNS SRV records are used for quite a few things such as SIP, XMPP, Kerbers, etc (http://en.wikipedia.org/wiki/SRV_record#Usage)
SvenDowideit commentedon Nov 17, 2014
@tianon can we look into this before 1.4?
tianon commentedon Nov 17, 2014
Is this something we choose explicitly, or something we inherited as a default setting from VirtualBox?
SvenDowideit commentedon Nov 18, 2014
I'm not sure atm, I think I only went with what someone else mentioned worked for them - but i'm not 100% sure.
tianon commentedon Nov 26, 2014
Looks like we enabled it on purpose: https://github.com/boot2docker/boot2docker-cli/blob/e41a9aea94fe6fc803ca70bc0a2f9e9c9f256aed/virtualbox/machine.go#L636
I'm gonna do a little testing without that.
tianon commentedon Nov 26, 2014
If we omit the flag, here's what we get:
Anyone suffering from this willing to test something like the following?
$ VBoxManage modifyvm boot2docker-vm --natdnshostresolver1 off --natdnsproxy1 offbuckett commentedon Nov 27, 2014
@tianon That works for me, but the tradeoff of no using the host resolver or proxy is that people running boot2docker on laptops may end up with broken DNS inside their VMs when they move between networks that have different DNS resolves setup I don't believe the change in DNS settings gets pushed through to the VM.
SvenDowideit commentedon Nov 28, 2014
mmm, that'll be an interesting tradeoff :/
buckett commentedon Nov 28, 2014
My summary of the options:
Is there a reason not to use the NAT DNS Proxy?
SvenDowideit commentedon Dec 1, 2014
it sure sounds better - we'll probably only find out if there are problems after we release with it :)
tianon commentedon Dec 1, 2014
Indeed. Thanks for the summary @buckett. I'll work up a PR to switch to the DNS Proxy and we can always switch over to no proxy if it turns out there are other glaring issues with the proxy.