ubuntu 18.04 关闭linode的 ipv6,下面方法有效:

    关闭linode的 ipv6,下面方法有效:

https://askubuntu.com/questions/1046057/disabling-ipv6-in-ubuntu-18-04-server

To clarify Stephan Rauch (for 18.04 only) - If using grub method to disable ipv6, the /etc/sysctl.conf configuration changes were not needed. I ended up leaving them in, (in case netplan is fixed in future) but all that is needed is the following:

sudo vi /etc/default/grub

Modify the GRUB_CMDLINEs to look like:

 
  1. GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"

  2. GRUB_CMDLINE_LINUX="ipv6.disable=1"

Then execute:

 
  1. sudo update-grub

  2. sudo reboot

Enjoy ipv4.

 

 

 

ubuntu16.04对于ipv6的开启和关闭

编辑99-sysctl.conf文件。

sudo gedit /etc/sysctl.d/99-sysctl.conf

复制并粘贴以下3行在文件的底部。

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

 

保存并关闭文件。 然后执行以下命令加载上述更改。

sudo sysctl -p

现在运行以下命令。 您应该看到1,这意味着IPv6已成功禁用。

cat /proc/sys/net/ipv6/conf/all/disable_ipv6
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值