I was trying to disable any sort of IPV6 in the LXC container, so far unsuccessfully.
And my container anyway receives correct, working IPV6
distro (host and container) - UBUNTU 16.04
Not sure if that's a bug of LXC - but in case it is configured somehow outside of container creating it here.
root@c1:~# echo "net.ipv6.conf.all.disable_ipv6=1" >> /etc/sysctl.d/999-ipv6.conf
root@c1:~# echo "net.ipv6.conf.default.disable_ipv6=1" >> /etc/sysctl.d/999-ipv6.conf
root@c1:~# reboot
stgraber@castiana:~$ lxc exec c1 bash
root@c1:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:3e:0b:d6:9f
inet addr:10.204.119.118 Bcast:10.204.119.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:57 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6725 (6.7 KB) TX bytes:1672 (1.6 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root@c1:~#
You could also just disable IPv6 on your bridge, that way there's no IPv6 address for the container to receive.
This way it works... Thanks so much. But why does it autoconfigure anyway while it was not supposed?
It likely was configured before the sysctls got applied. Setting autoconf to 0 doesn't remove anything that was configured prior to the setting being set.
You could also just disable IPv6 on your bridge, that way there's no IPv6 address for the container to receive.
How could I do this?.
@hablutzel1 ipv6.address=none