this is one of the reasons why we really suggest to disable ipv6 via sysctl
FYI: Unfortunately, disabling via the proscribed method doesn't disable it in LXC containers that existed prior to when ipv6 was disabled via sysctl on the proxmox host...
-Proxmox host set to static IPV4 address via netplan
-Moved Proxmox host from network that supported DHCP ipv6 to network that does not.
-Proxmox host DNS continues to function via IPV4 as expected.
-LXC container set to IPV6 DHCP continues to have old IPV6 DHCP DNS hosts present in resolve.conf so DNS does not function within the LXC container.
-Performed procedure to disable IPV6 on host via sysctl:
https://pve.proxmox.com/pve-docs/chapter-sysadmin.html#_disabling_ipv6_on_the_node
-On host IPV6 is indeed disabled afterward:
root@richie:~# ip -4 a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
3: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
inet 10.0.111.12/24 brd 10.0.111.255 scope global vmbr0
valid_lft forever preferred_lft forever
root@richie:~# ip -6 a
root@richie:~#
-But inside a privileged LXC container it is still enabled:
root@portainer:/etc# ip -6 a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0@br-bffbd40cd223: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 2601:640:8900:3dc0::e2ac/128 scope global
valid_lft forever preferred_lft forever
inet6 fe80::d4c9:6fff:fe79:ca63/64 scope link
valid_lft forever preferred_lft forever
3: br-beaa20a1e139: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::42:a5ff:fe10:8f0b/64 scope link
valid_lft forever preferred_lft forever
4: br-bffbd40cd223: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::42:14ff:fef8:d040/64 scope link
valid_lft forever preferred_lft forever
5: br-c61c728f64eb: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::42:e7ff:febf:4b52/64 scope link
valid_lft forever preferred_lft forever
6: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::42:5cff:fe9b:eba6/64 scope link
valid_lft forever preferred_lft forever
7: br-ebb8e9d0917b: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::42:cff:fe2b:8bec/64 scope link
valid_lft forever preferred_lft forever
8: br-057f3acf439d: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::42:d3ff:fe44:24eb/64 scope link
valid_lft forever preferred_lft forever
9: br-1ec39feb68f4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::42:30ff:fe8b:d696/64 scope link
valid_lft forever preferred_lft forever
10: br-b0022bc99256: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::42:deff:fe4a:2f/64 scope link
valid_lft forever preferred_lft forever
12: veth8491b30@if11: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::c0b7:5dff:fe89:c25c/64 scope link
valid_lft forever preferred_lft forever
14: vetha3de996@if13: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::40f8:10ff:fe83:fb09/64 scope link
valid_lft forever preferred_lft forever
16: vethd586943@if15: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::e08e:96ff:fe77:4b1b/64 scope link
valid_lft forever preferred_lft forever
18: veth4bd6221@if17: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::5886:7ff:fe85:e168/64 scope link
valid_lft forever preferred_lft forever
20: veth9064199@if19: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::543b:89ff:fe7e:e743/64 scope link
valid_lft forever preferred_lft forever
22: veth5afed1a@if21: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::ace4:f0ff:fef7:7efd/64 scope link
valid_lft forever preferred_lft forever
24: veth5c625d5@if23: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::9095:35ff:fe94:fa0d/64 scope link
valid_lft forever preferred_lft forever
26: veth75cf84f@if25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::5e:c7ff:fe40:d604/64 scope link
valid_lft forever preferred_lft forever
28: veth9d45475@if27: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::3c67:5dff:fe7b:77a9/64 scope link
valid_lft forever preferred_lft forever
30: veth1be098b@if29: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::505a:44ff:fe0a:b514/64 scope link
valid_lft forever preferred_lft forever
32: veth8c84b5b@if31: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::88a3:67ff:fef6:79b5/64 scope link
valid_lft forever preferred_lft forever
root@portainer:/etc
-And DNS resolution continues to fail:
root@portainer:/etc# cat /etc/resolv.conf
nameserver 2001:558:feed::1
nameserver 2001:558:feed::2
root@portainer:/etc#
So the "approved" method to disable IPV6 doesn't propagate to existing LXC containers
Not sure what the "approved" method to disable IPV6 is for existing LXC containers but still looking...
-=dave