max-232 Posted December 31, 2020 Posted December 31, 2020 Armbianmonitor: http://ix.io/2KpC I'm trying to disable IPv6 on my NanoPi Neo2. Initially I used the option in armbian-config -> Network -> IPv6 (toggle). I can confirm that IPv6 is disabled by running 'ip a' and no longer seeing any IPv6 addresses. And I can also confirm that the following config is changed in /etc/sysctl.conf: net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 However after a reboot I see the IPv6 addresses back. I found a guide (itsfoss) that suggest the same changes to sysctl.conf and if the changes do not persist ander a startup I should make edit /etc/rc.local : #!/bin/bash # /etc/rc.local /etc/sysctl.d /etc/init.d/procps restart exit 0 However that didn't seem to help. Looking in the forums I came across one topic which is marked solved however I think the author might have had the same issue (how-can-i-disable-ipv6-or-use-temporary-addresses-regular-methods-dont-work-solved) Does anyone else have this issue and know how to solve it? Thanks and happy new year!
Werner Posted December 31, 2020 Posted December 31, 2020 26 minutes ago, max-232 said: However after a reboot I see the IPv6 addresses back. Very odd. Are the mentioned entries still present in the sysctl.conf after reboot?
max-232 Posted December 31, 2020 Author Posted December 31, 2020 It does. Here is a console output right after a reboot. As you can see the sysctl.conf persisted however I still have a IPv6 address. But, what I forgot to mention, is that the configuration is applied after running the 'sudo sysctl -p' command. root@NanoPiNeo2:~# cat /etc/sysctl.conf [...] vm.swappiness=100 net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 root@NanoPiNeo2:~# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 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 mq state UP group default qlen 1000 link/ether 02:01:5b:46:21:95 brd ff:ff:ff:ff:ff:ff inet 192.168.1.102/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0 valid_lft 86152sec preferred_lft 86152sec inet6 fd68:a057:2b71:1:78cc:3d8e:4a3a:347a/64 scope global temporary dynamic valid_lft 7121sec preferred_lft 7121sec inet6 fd68:a057:2b71:1:a203:3b39:51e7:9a7f/64 scope global dynamic mngtmpaddr noprefixroute valid_lft 7121sec preferred_lft 7121sec inet6 fe80::a711:5254:f436:6b24/64 scope link noprefixroute valid_lft forever preferred_lft forever root@NanoPiNeo2:~# sudo sysctl -p vm.swappiness = 100 net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 root@NanoPiNeo2:~# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 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 mq state UP group default qlen 1000 link/ether 02:01:5b:46:21:95 brd ff:ff:ff:ff:ff:ff inet 192.168.1.102/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0 valid_lft 86135sec preferred_lft 86135sec So maybe the actual problem is that the sysctl.conf isn't being loaded on startup. And/or '/etc/rc.local' is ignored.
Werner Posted December 31, 2020 Posted December 31, 2020 31 minutes ago, max-232 said: And/or '/etc/rc.local' is ignored. At least that is normal since Ubuntu deprecated that function. However there are tutorials in the web to bring it back
Solution max-232 Posted December 31, 2020 Author Solution Posted December 31, 2020 2 minutes ago, Werner said: At least that is normal since Ubuntu deprecated that function. However there are tutorials in the web to bring it back Good to know, let's ignore that part. Browsing to the topics I did find one other topic: impossible-to-disable-ipv6 This talks about the same issue but for a secondary ethernet port. With nmtui-edit -> edit -> IPv6 Configuration, set 'Automatic' to 'Ignore' I did finally disable IPv6 permanently. This solves my problem but I'm still wondering what the IPv6 setting in armbian-config is supposed to do and if it is working correctly.
Werner Posted December 31, 2020 Posted December 31, 2020 Networkmanager always has been an issue in itself for several reasons. I guess you found another one why the fallback solution ifupdown should be preferred
Recommended Posts