修改系统配置

  • vi /etc/sysctl.conf 最后添加
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
  • 载入内核
sudo sysctl -p
sudo netplan apply

查看ip
ip addr show eno1
ip addr
ip a |grep inet6