-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
new lima breaks DNS resolution with docker #18
Comments
The new lima feature is optional and can be disabled https://github.com/lima-vm/lima/blob/master/pkg/limayaml/default.yaml#L197. You can modify colima's source and add that config line to see if that fixes it as a temporary workaround. I will try to reproduce this and include a fix in the imminent v0.2.0. |
@brokenjacobs what is the expected behaviour and what is broken? DNS resolutions are working as expected for me. Can you kindly elaborate as I am not a network expert. Are all DNS resolutions failing for you, or the nat rules are affecting specific scenarios? Thanks. |
So what I did was modify colima to include that config line, and things broke at that point. Reading the lima docs, when qemu starts the vm, it provides a dns resolver at 192.168.5.3 udp port 53. However, this resolver does not support the native mac "host resolver", it just looks at the resolv.conf in osx. Consequently any dns names resolved via a VPN, or using mdns, will not work inside the lima VM. So when you set
For whatever reason, this rule is NOT triggering for docker originated traffic, so the dns resolver being used is the QEMU one, not the hostagent resolver. |
Apparently, a fix for this is in the works. lima-vm/lima#319. |
Looks like an upstream issue then. Thanks for checking! Closing. |
There is a fix in the new lima for DNS resolution:
lima-vm/lima#281
And it appears that what happens is the iptables rule for the nat redirect hits after the docker nat rule:
You can test this by running dig inside a container pointed at the port in the nat rule, that works. But trying to hit 192.168.5.3.
I'm not sure where to fix this, but it probably just means that the nat rule from lima needs to run before docker installs it's rules. Trouble is I can't figure out where that is happening.
The text was updated successfully, but these errors were encountered: