-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vagrant needs a configuration option to not globally enable the NatDNSProxy option in Virtualbox #1313
Comments
+1 for a disable/enable option Am 11.01.2013 um 23:55 schrieb Brian Hatfield notifications@github.com: As seen in this pull request Unfortunately, the natdnsproxy in Virtualbox is not very reliable. In fact, For example, 'dig google.com' works fine but SOMETIMES the dnsproxy will This is a problem when issuing DNS lookups against hosts with a large Thus, certain lookups through the NatDNSProxy will fail. I don't need it How can I turn it off? VirtualBox doesn't seem to like me adding a second — |
Why doesn't VirtualBox like you setting it off again? What message do you get? |
@mitchellh It turns out that setting it off again is indeed working for us. I'm not sure what corner case I got myself in where it didn't work (I think applying it off again on a running VM means that the VM doesn't re-pull DHCP and doesn't re-set /etc/resolv.conf?). So for my environment, which is somewhat complex, I have applied this against each VM definition. It's still pretty gross and I'd still like to advocate for a cleaner way of disabling it. I'd even be of mind to advocate for this not being the default, but I certainly understand the use case proposed in the original pull request. Furthermore, I'd like to note that we were able to even further narrow this issue down - it turns out that it's only the NATDNSProxy option in the Linux VirtualBox builds that has this "TCP DNS doesn't work sometimes" issue, our Mac VBox hosts are not seeing this problem. At least VirtualBox 4.1x and 4.2x are affected. |
@bmhatfield Roger. Good to hear. I'll definitely be adding an option for this. Stand by. |
@mitchellh I'm also looking forward to this option. Hopefully it'll help with #1172, too. I just discovered the dns proxy thing. It's apparently been enabled since v1.0.2 and I've noticed that I still have to do |
When set to false, Vagrant will no longer try to automatically manage NAT DNS proxy settings with VirtualBox.
I added the config.vm.provider :virtualbox do |vb|
vb.auto_nat_dns_proxy = false
end I understand the syntax is foreign right now, but it will be well documented with 1.1 |
👍 |
This post is related but somewhat off-topic. I'm trying to get an xubuntu guest Vagrant box (host = Win7) to connect using the host's proxy settings. I've been in google hell, and have thus far concluded that this may in fact be possible but I don't know what settings I need to have in my VagrantFile to attain this result. This message thread is the closest thing to possible answers supplied by people who are in a position to know. I currently have this line in my config: I've done a bunch of experimentation w/ settings such as --natdnsproxy1, but I've not found the silver bullet. I'm currently using Vagrant 1.0.7. Is my intended result attainable? |
@mitchellh - I am using the Thanks, |
@jperry I do not see this option working either. I use #1172 (comment) to work around the issue. |
Was this ever documented? I can't find anything here: http://docs.vagrantup.com/v2/virtualbox/configuration.html |
auto_nat_dns_proxy = false does not work. I'm not sure if this is a regression or bugged since introduction. |
This is old, but in case anybody else comes here wondering about the last comments about this not working: I think there was a misunderstanding about the setting's purpose. All the
|
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
As seen in this pull request (#749), Vagrant will globally enable "--natdnsproxy1", "on" except if the machine has a resolv.conf that points to localhost.
Unfortunately, the natdnsproxy in Virtualbox is not very reliable. In fact, it's so bad that TCP lookups against it will fail.
For example, 'dig google.com' works fine but SOMETIMES the dnsproxy will fail and 'dig google.com +tcp' will not work.
This is a problem when issuing DNS lookups against hosts with a large response (IE, an AWS ELB or any sort of DNS load balanced service), because DNS falls back to TCP for lookups.
Thus, certain lookups through the NatDNSProxy will fail. I don't need it enabled (I don't fit the use case in the above pull request), and since it's junk, I don't want it enabled.
How can I turn it off? VirtualBox doesn't seem to like me adding a second modifyvm that adds the command again to turn it back off.
The text was updated successfully, but these errors were encountered: