Hello guys.
I have a problem with containers and the configuration of the DNS server to be used for internet traffic: regardless of how I configure the DNS servers to be used, whether it is:
When I restart the container, every somthing modifies the /etc/resolv.conf source, file assigning, as DNS servers to be used, the DNS of my provider and not mine.
I have two of my own DNS servers: a classic one using dnsmasq, and another one with PiHole on two different containers, and they work perfectly, but I can't get them to be used automatically by my containers, because at each restart or network service restart, PVE assign themselves the DNS servers of my provider.
Spadhausen is my internet provvider.
How can it be resolved so that the containers use the DNS servers that I want? Of course, excluding manual modification, or via script, at each restart?
Thanks to anyone who can point me a way to solve this annoying problem.
IG
I have a problem with containers and the configuration of the DNS server to be used for internet traffic: regardless of how I configure the DNS servers to be used, whether it is:
- via proxmox webgui
- via network configuration from proxmox webgui
- via file /etc/resolv.conf
- via manual modification of the pve configuration file (/etc/pve/lxc/XXX.conf)
When I restart the container, every somthing modifies the /etc/resolv.conf source, file assigning, as DNS servers to be used, the DNS of my provider and not mine.

I have two of my own DNS servers: a classic one using dnsmasq, and another one with PiHole on two different containers, and they work perfectly, but I can't get them to be used automatically by my containers, because at each restart or network service restart, PVE assign themselves the DNS servers of my provider.
Code:
cat /etc/resolv.conf
nameserver 2a05:9d40:dc1:d1::2
nameserver 2a05:9d40:dc2:d2::2
Code:
whois 2a05:9d40:dc1:d1::2
inet6num: 2a05:9d40::/32
netname: IT-SPADHAUSEN-SRL-BACKBONE
country: IT
Spadhausen is my internet provvider.
How can it be resolved so that the containers use the DNS servers that I want? Of course, excluding manual modification, or via script, at each restart?
Thanks to anyone who can point me a way to solve this annoying problem.
IG