ophub / amlogic-s9xxx-armbian

Support for Armbian in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x2, s912, s905d, s905x, s905w, s905, s905l, rk3588, rk3568, rk3399, rk3328, h6, etc.
GNU General Public License v2.0
6.27k stars 2.02k forks source link

armbian-config: Disable IPv6 not work (after reboot) #1517

Closed silverwolf42 closed 1 year ago

silverwolf42 commented 1 year ago

Device Information | 设备信息

Armbian Version | 系统版本

Describe the bug | 问题描述 使用 armbian-config 关闭了 IPv6,重启 之后网卡接口仍然出现了 inet6

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
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever

  .......

4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
    altname end0
    inet 192.168.1.2/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0
       valid_lft 51622sec preferred_lft 51622sec
    inet6 fe80::4fa3:f967:1a95:9bf2/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

sysctl.conf 仍然包含了

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

重启后登录armbian手动执行 sysctl -p 重载网络配置关闭IPv6

ophub commented 1 year ago

My results are the same as yours. I have also consulted various relevant materials before, but I couldn't find a complete solution. I have included sysctl -p in the startup tasks to execute.

silverwolf42 commented 1 year ago

nmcli connection modify "Wired connection 1" ipv6.method disabled works!

refer to https://access.redhat.com/documentation/zh-cn/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/using-networkmanager-to-disable-ipv6-for-a-specific-connection_configuring-and-managing-networking

ophub commented 1 year ago

Thanks for sharing, this method works

ophub commented 1 year ago

https://github.com/ophub/amlogic-s9xxx-armbian/commit/15c259181cf403d7c79ba549521bc551925b6ae6

I added this method to the documentation.