-
Notifications
You must be signed in to change notification settings - Fork 85
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
The DNS resolution in container has different behavior with and without "--dns" added in "podman run" command, even the /etc/resolv.conf have the same content in container #855
Comments
Please try with the latest podman and netavark verions. |
It's nothing to do with the firewall rule, the immediate cause is you specified the same For the sake of ease of description, let's use Below is the root cause analysis.
Moving on, I think the first thing is that we should definitely not specify |
Ah yes I missed that part, yeah you should not give us the aardvark-dns with --dns. You should only give the upstream resolvers via that flag. Ignoring our own listening ips sounds like a reasonable suggestion. Alternative would be to error out because we should not allow user to end up in a infinite recursion. |
Thank you @Luap99 for your prompt response.
Shall I open an |
Yes please |
Sure, containers/aardvark-dns#415 is filed. |
Per the current implementation, the name servers defined in host's |
That is already the case with the latest version. |
ENV
[Rootful]
aardvark-dns-1.5.0-2.module+el8.8.0+19993+47c8ef84.x86_64
netavark-1.5.1-2.module+el8.8.0+19993+47c8ef84.x86_64
networkBackend is netavark
OS: RHEL 8.8
What is the issue
The DNS resolution in container has different behavior with and without "--dns" added in "podman run" command, even the /etc/resolv.conf have the same content in container.
How to reproduce
Create dual stack network using command:
podman network create --driver=bridge --subnet=192.168.230.0/25 --ipv6 --subnet=fdf8:192:168:230::/121 foo
Execute command to run two container:
podman run -d -it --dns=192.168.230.1 --dns=fdf8:192:168:230::1 --dns=${my_dns} --name foo_1 --network foo ${my_image}
podman run -d -it --name foo_2 --network foo ${my_image}
My iptables and ip6tables rule:
RCA
Why in foo_1 is very slow.
Here is the part of tcpdump details when running getent in foo_1:
The DNS response blocked by the 2nd iptable/ip6table rule in INPUT chain and finally got result from my custom DNS
However, in foo_2, it was not blocked, it returned very fast:
Question
What is the different behavior using --dns and without --dns when running "podman run"? Why in foo_2 the dns response not blocked by the iptables rule?
The text was updated successfully, but these errors were encountered: