Closed jiridanek closed 8 months ago
I am already working on a fix which should restore the slirp4netns behaviour with pasta (https://github.com/containers/podman/pull/22043, if you could build and test it that would be great)
However what I do not understand is why dns is not resolving:
nameserver 10.200.0.245
nameserver 10.192.206.245
These are still valid servers, no? I assume the issue is that you have split dns setup and the container of course will just route everything to one address.
I realize I sort of screwed up the report my inconsistent censorship. Let's show the real IPs. They are just meaningless IPs.
nameserver 10.200.0.245
nameserver 10.192.206.245
These are valid servers, but they are the ones that DHCP running on my WiFi assigned me.
What I want to be using is one of the DNS servers on the VPN.
Current DNS Server: 10.45.248.15
DNS Servers: 10.45.248.15 10.38.5.26
This is what resolvectl
gives me:
Link 3 (wlp0s20f3)
Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
Protocols: +DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 10.192.206.245
DNS Servers: 10.200.0.245 10.192.206.245
Link 4 (tun0)
Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
Protocols: -DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 10.45.248.15
DNS Servers: 10.45.248.15 10.38.5.26
DNS Domain: redhat.com
@Luap99 Let me know when https://github.com/containers/podman/pull/22043 builds cleanly in Packit, I'll install it from there then!
Hmm, never mind, it does actually build already, https://download.copr.fedorainfracloud.org/results/packit/containers-podman-22043/fedora-40-x86_64/07159051-podman/ Trying to install that.
yeah the container has no idea about the split dns setup, my PR will almost certainly fix this as it will insert a new ip in resolv.conf which will be used by pasta to proxy.
Actually you do not need a build, just add --network pasta:--dns-forward,169.254.0.1 --dns 169.254.0.1
to the podman run command, that should result in the same thing, my changes only make something like that the default basically
Ok, tried your command and also the updated pkg versions, both work
$ podman run --network pasta:--dns-forward,169.254.0.1 --dns 169.254.0.1 --rm -it quay.io/fedora/fedora:38-x86_64 curl http://download-node-02.eng.bos.redhat.com
Forgot to post workaround, so here it is, if anyone is still interested. Switch from pasta back to slirp4netns.
$ cat ~/.config/containers/containers.conf
[containers]
[engine]
[machine]
[network]
default_rootless_network_cmd="slirp4netns"
[secrets]
[configmaps]
FYI the fix is not in 5.0.0 however I work on backporting it so that will be included in the next 5.0.1 release
Good I put up my workaround. I might need to point my fellow early-adopter colleagues to it, if they get Fedora 40 before podman 5.0.1 is in.
@jiridanek Thanks for your workaround! I searched all the day, but couldn't understand why DNS inside the container(s) didn't work at all after upgrading Podman 5.0 on Silverblue.
Issue Description
After updating, I can no longer resolve domain names using DNS servers on my corporation's VPN.
My DNS setup looks like this
Steps to reproduce the issue
Steps to reproduce the issue
Describe the results you received
Describe the results you expected
When I add
--network=slirp4netns
, things start to work.podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
$ podman version Client: Podman Engine Version: 5.0.0-rc6 API Version: 5.0.0-rc6 Go Version: go1.22.0 Built: Wed Mar 13 01:00:00 2024 OS/Arch: linux/amd64
$ rpm -q podman podman-5.0.0~rc6-2.fc40.x86_64
$ cat /etc/redhat-release Fedora release 40 (Forty)
Prerelease, updated to today's versions of packages.
Additional information
This problem is similar in symptoms to my previous issue