On 30/05/2023 15:38, Paul Holzinger wrote:
This was a bug in 4.4 I think, you need to update to podman v4.5 (https://github.com/containers/podman/issues/17499).

If you use a network with dns enabled we will now always use the aardvark-dns resolver in resolv.conf and then aardvark-dns forwards to the correct --dns ip when the query was not a container name.

Paul

On Tue, May 30, 2023 at 3:32 PM Daniel Walsh <dwalsh@redhat.com> wrote:
On 5/30/23 09:14, lejeczek via Podman wrote:


On 30/05/2023 14:00, Daniel Walsh wrote:
On 5/29/23 05:59, lejeczek via Podman wrote:
Hi guys.

--dns=none renders what expected but with an actual server, say: --dns=10.3.1.200
resolve.conf seems to be the one of the host's, as if --dns did not happen.
Can anybody else say that is the case? Am I missing something?
I'm on Centos 9 stream with all bits up-to-date.
many thanks, L.

_______________________________________________
Podman mailing list -- podman@lists.podman.io
To unsubscribe send an email to podman-leave@lists.podman.io

Here is what I am getting?

```
# podman run --dns=10.3.1.200 alpine cat /etc/resolv.conf
nameserver 10.3.1.200
# podman run --dns=none alpine cat /etc/resolv.conf
cat: can't open '/etc/resolv.conf': No such file or directory
```

Rootless

```
$ podman run --dns=10.3.1.200 alpine cat /etc/resolv.conf
nameserver 10.3.1.200
$ podman run --dns=none alpine cat /etc/resolv.conf
cat: can't open '/etc/resolv.conf': No such file or directory
```

I'm trying, for production setup, Centos 9 (perhaps all official, available versions?)

podman run -dt --network=off-host --ip=${_IP} --dns=10.3.1.200 --hostname ${_H}.${_DOM} --name ${_NAME} localhost/centos9-mine
...
[root@centos-whale /]# cat /etc/resolv.conf
search mine.priv mszczonow.vectranet.pl
nameserver 10.3.1.254
nameserver 89.228.4.126
nameserver 31.11.173.2
nameserver 10.1.1.254
options timeout:1

that 'resolv.conf' is an exactl copy off the host, this:

podman run -dt --network=off-host --ip=${_IP} --dns=none --hostname ${_H}.${_DOM} --name ${_NAME} localhost/centos9-mine

[root@centos-whale /]# cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.122.1

Perhaps the issue(s) is with centos?
centos9-mine is done off the 'quay.io/centos/centos' with only a couple add rpm packages.


With what is in 'copr' - though there are issues with packages dependencies + latest 'crun' "breaks" - which is 4.6.0-dev, I still end up with '--dns=10.3.1.200' having no effect.