Disable ipv6 in linux

Source: Internet
Author: User

Ipv6 is designed to address ipv4 address insufficiency. Many IDC vendors are now using ipv6, but sometimes we do not need ipv6. How can we disable it?

. Modify the corresponding Nic of/etc/sysconfig/network and append the following:

The Code is as follows: Copy code

NETWORKING_IPV6 = no

2. Modify/etc/hosts and comment out the local host name resolution in ipv6:

The Code is as follows: Copy code

#: 1 localhost localhost6 localhost6.localdomain6

3. Create the file/etc/modprobe. d/ipv6off. conf (name as needed)

Note: The/etc/modprobe. conf file is missing after RHEL6.0.

The Code is as follows: Copy code

Alias net-pf-10 off
Options ipv6 disable = 1

4. restart the system and then confirm:

The Code is as follows: Copy code
[Root @ test ~] # Lsmod | grep-I ipv6
[Root @ test ~] # Ifconfig | grep-I inet6

If the execution results of the preceding two commands are not displayed, ipv6 is completely forbidden.

Others:
In the method of not loading the ipv6 module, someone may set it like this:

The Code is as follows: Copy code
Alias net-pf-10 off
Alias ipv6 off
Options ipv6 disable = 1

Although ipv6 is not loaded after the system is restarted, in some versions, when we restart the network, the following error occurs: FATAL: module off not found.

RedHat 5.x

To disable IPv6 in a virtual machine running RedHat 5.x:
1. Log in as root or superuser. www. bKjia. c0m

2. If the/etc/sysconfig/network file contains the line NETWORKING_IPV6 = yes, change the line:

NETWORKING_IPV6 = no

 


3. In the file/etc/modprobe. conf, add this line:

Options ipv6 disable = 1

 

4. Save the file and reboot the system.

After you disable IPv6, you should be able to install and configure VMware Tools successfully.

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.