美文网首页
CentOS7彻底关闭IPV6

CentOS7彻底关闭IPV6

作者: 水平号 | 来源:发表于2020-03-10 11:28 被阅读0次
    1. Edit /etc/default/grub and add ipv6.disable=1 in line GRUB_CMDLINE_LINUX, e.g.:
      在GRUB_CMDLINE_LINUX后面添加ipv6.disable=1
    # cat /etc/default/grub
    GRUB_TIMEOUT=5
    GRUB_DEFAULT=saved
    GRUB_DISABLE_SUBMENU=true
    GRUB_TERMINAL_OUTPUT="console"
    GRUB_CMDLINE_LINUX="ipv6.disable=1 crashkernel=auto rhgb quiet"
    GRUB_DISABLE_RECOVERY="true"
    
    1. Regenerate a GRUB configuration file and overwrite existing one:
     grub2-mkconfig -o /boot/grub2/grub.cfg
    
    1. Restart system and verify no line “inet6” in “ip addr show” command output.
    # shutdown -r now
    # ip addr show | grep net6
    

    相关文章

      网友评论

          本文标题:CentOS7彻底关闭IPV6

          本文链接:https://www.haomeiwen.com/subject/wvtwdhtx.html