Disable IPV6 network in CentOS 6.7

Source: Internet
Author: User

Disable IPV6 network in CentOS 6.7

IPV6 is enabled when the system is installed, but IPV6 is not required in actual use, so you need to disable it. The following is my solution.

At the beginning, I also stepped on a lot of pitfalls. I read a lot of sharing methods on the Internet and did not try to verify whether IPV6 is enabled for use:

ifconfig | grep inet6

Or

lsmod| grep ipv6

1) Disable ip6tables

#chkconfigip6tablesoff

2) disable the ipv6 network (/etc/sysconfig/network)

#vim/etc/sysconfig/network NETWORKING_IPV6=no

3) Disable Nic IPV6 settings

#vim/etc/sysconfig/network-scripts/ifcfg-eth0 IPV6INIT=no IPV6_AUTOCONF=no

4) Modify/etc/hosts, disable ipv6 settings, and comment on ipv6 Resolution:

#vim/etc/hosts #::1localhostlocalhost.localdomainlocalhost6localhost6.localdomain6

Many of the above four methods have been introduced on the network. After restarting the system, ipv6 still cannot be disabled, and then it is difficult to solve the problem. The following method can be used for verification.

Add the following configuration to the/etc/modprobe/dist. conf file:

#vim/etc/modprobe/dist.conf alias net-pf-10off alias ipv6off

Then restart the system. However, in some cases, this method does not take effect. You also need to add:

install ipv6 /bin/true

Then restart the system and check for verification:

ifconfig | grep inet6

Or

lsmod| grep ipv6

If no data is returned, it indicates that it is disabled.

In addition, you can also share it online in/boot/grub. in the conf file, the kernel starts with quiet and ends with disable. ipv6 = 1. This method does not have ipv6 when ifconfig | grep inet6 is used for verification, but lsmod | grep ipv6 verification still exists.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.