14 December 2017

steps

  1. method 1

    1. disable all nic

       $ nano /etc/sysctl.conf
       ...
       net.ipv6.conf.all.disable_ipv6=1
       net.ipv6.conf.default.disable_ipv6=1
       ...
      
    2. disable special nic

       $ nano /etc/sysctl.conf
       ...
       net.ipv6.conf.eno1.disable_ipv6=1
      
    3. to make the setting affective execute, no reboot required

       $ sysctl -p
      
  2. method 2

    1. use echo

       $ echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
       $ echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6
      
    2. use sysctl

       $ sysctl -w net.ipv6.conf.all.disable_ipv6=1
       $ sysctl -w net.ipv6.conf.default.disable_ipv6=1
      

reference

  1. https://www.unixmen.com/disable-ipv6-centos-7/


blog comments powered by Disqus