RTNETLINK answers: Permission denied

Error shows up after trying to add IPv6 address to network interface on Linux (Debian 11) distro

Example command:

ip addr add 2001:db8::1/64 dev eth0

In my case ipv6 was blocked in /etc/sysctl.conf, problem solved after next settings:

net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0

After config changes need to apply new settings:

sysctl -p