RockyLinux 9 如何禁用ipv6
查看 RockyLinux 9 的网络配置
cat /etc/NetworkManager/system-connections/ens160.nmconnection
ipv6的配置是
[ipv6]
addr-gen-mode=eui64
method=auto
修改 method 为 disabled
[ipv6]
addr-gen-mode=eui64
#method=auto
method=disabled
重启网络
systemctl restart NetworkManager
可以看到已经没有ipv6的配置信息
ifconfig
ens160: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.10 netmask 255.255.255.0 broadcast 192.168.1.255
ether 00:0c:89:64:16:56 txqueuelen 1000 (Ethernet)
RX packets 2876 bytes 243919 (238.2 KiB)
RX errors 0 dropped 720 overruns 0 frame 0
TX packets 2054 bytes 367363 (358.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0