IPv6 with DHCP enabled overwrites resolv.conf

azuriye

New Member
Oct 26, 2024
2
0
1
I am facing an issue similar to this thread

Currently I have DHCP setup for ipv6 only as my router gets assigned different delegated prefixes after every router reboot.

I want to have an ipv4 and ipv6 DNS server in /etc/resolv.conf but modifying dhclient.conf and using prepend 192.168.0.1 just overwrites the whole resolv.conf file with an ipv4 address. Setting the DNS servers for the host in Proxmox GUI is overwritten after reboot with an ipv6 dns.

Code:
root@azuriye-pve:~# cat /etc/network/interfaces
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!

auto lo
iface lo inet loopback

iface enp1s0 inet manual
        post-up /usr/sbin/ethtool -s enp1s0 wol g

auto vmbr0
iface vmbr0 inet static
        address 192.168.0.143/24
        gateway 192.168.0.1
        bridge-ports enp1s0
        bridge-stp off
        bridge-fd 0

iface vmbr0 inet6 dhcp
        accept_ra 2
        post-up sleep 10 && dhclient -6 vmbr0

iface wlo1 inet manual

source /etc/network/interfaces.d/*
 
I have a similar problem. In my case the resolv.conf is overwritten by nameserver fdce:d524:e060::1 . Due to this I am not be able to resolve dns requests.
 
  • Like
Reactions: azuriye
I changed the Ipv6 configuration of the lxc container to static without an IPv6 address. That 'solved' the problem, but this is just a workaround.
 
I changed the Ipv6 configuration of the lxc container to static without an IPv6 address. That 'solved' the problem, but this is just a workaround.
Setting it to static should in theory not overwrite the DNS records I set but only problem is that every time my router restarts the IPv6 prefix delegation (DHCPv6-PD) changes and I need to edit the static address as well to reflect it.

I could ditch IPv6 all together but wanted to if anyone else faces the same issue and how they went about rectifying it.