Hello All,
I would like to turn off IPv6 on my ubuntu core 16 system in a permanent way. I tried to do that via snapd by isssuing the command snap set system network.disable-ipv6=true
but, after a reboot, net.ipv6.conf.eth0.disable_ipv6
is back to 0
. So the system is then in the following situation
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 1
Why is the setting for eth0
back to 0
?
Of course, to make it persistent, I can write into /etc/sysctl.d/10-snapd-network.conf
but I would like to interact with the system via snapd only.
Any solution?
Thanks
Does the interface actually have an IPv6 address?
Yes it does.
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 02:01:02:03:0b:ff brd ff:ff:ff:ff:ff:ff
inet 192.168.5.54/24 brd 192.168.5.255 scope global dynamic eth0
valid_lft 5182833sec preferred_lft 5182833sec
inet6 fe80::1:2ff:fe03:bff/64 scope link
valid_lft forever preferred_lft forever
In this case it just shows the auto assigned one since I moved the device into another network, but in case a DHCP6 server is present, it takes a global one too.
So in theory this option should disable IPv6, but afaiu it is possible that the interface comes up earlier than sysctls get applied in which case you could end up with ipv6 on said interface. Does lo
have link local IPv6 address too?
My bad, I should have posted the full picture. No, loopback does not have a inet6 address:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 02:01:02:03:0b:ff brd ff:ff:ff:ff:ff:ff
inet 192.168.5.54/24 brd 192.168.5.255 scope global dynamic eth0
valid_lft 5166918sec preferred_lft 5166918sec
inet6 fe80::1:2ff:fe03:bff/64 scope link
valid_lft forever preferred_lft forever