Disable or enable the IPV6 protocol in Red Hat Enterprise Linux

Source: Internet
Author: User

Resolution

Red Hat Enterprise Linux 4, 5 and 6 enable Internet Protocol Version 6 (IPV6) by default. However, in certain situations, some users could find it desirable to disable IPV6 support or to re-enable it after it had b Een disabled.

For Red Hat Enterprise Linux 6, the tech brief Preparing for IPv6 Networking in Red Hat Enterprise Linux provides a broad Introduction to IPV6 Networking.

Disabling IPV6 support in Red Hat Enterprise Linux 6
  1. Create a file with the /etc/modprobe.d/ipv6.conf following contents:

    options ipv6 disable=1
  2. For completeness, it's a good idea to configure the ip6tables service not to start at boot by issuing the following command:

    # chkconfig ip6tables off
  3. Edit and add the line /etc/sysconfig/networkNETWORKING_IPV6=no

  4. Disable IPv6 support in the kernel through /etc/sysctl.conf :

    # ipv6 support in the kernel, set to 0 by defaultnet.ipv6.conf.all.disable_ipv6 = 1net.ipv6.conf.default.disable_ipv6 = 1
  5. Optionally to prevent rpc.nfsd setting up IPV6 sockets while NFS server was running, edit for the /etc/netconfig lines starting with UD P6 and TCP6; Change the of the "v" third column to "-" (Hyphen/dash)

  6. Reboot the system to disable IPV6 support.

Note:there is a special case where this might isn't work, please see the "IPv6 disable=1" option does not seem to work on R Ed Hat Enterprise Linux 6 system.
Disabling IPv6 in the sysctl.conf would ensure IPv6 isn ' t used even if the IPv6 module is loaded and can work as a short te RM solution (until a full reboot)

Re-enabling IPv6 support in Red Hat Enterprise Linux 6
  1. Review the files under and /etc/modprobe.d/ remove (or comment out) any of the following lines:

    options ipv6 disable=1install ipv6 /bin/trueblacklist ipv6
  2. Configure the ip6tables service to start at boot by issuing the following command:

    # chkconfig ip6tables on
  3. Edit and add the line /etc/sysconfig/networkNETWORKING_IPV6=yes

  4. Make sure the following options to your is /etc/sysctl.conf

    # ipv6 support in the kernel, set to 0 by defaultnet.ipv6.conf.all.disable_ipv6 = 0net.ipv6.conf.default.disable_ipv6 = 0
  5. Edit for the /etc/netconfig lines starting with UDP6 and TCP6; change the "-" (Hyphen/dash) in the third column to"v"

  6. Reboot the system to activate IPV6 support.

Disabling IPV6 support in Red Hat Enterprise Linux 5
  1. Remove the following line (if present) from the /etc/modprobe.conf file:

    alias net-pf-10 ipv6
  2. Add the following line to the /etc/modprobe.conf file:

    alias net-pf-10 off
  3. In versions of Red Hat Enterprise Linux before 5.4, add the following line to the /etc/modprobe.conf file:

    alias ipv6 off
  4. In Red Hat Enterprise Linux 5.4 and later, add the following line to the /etc/modprobe.conf file:

    options ipv6 disable=1
  5. To prevent errors during the network Initscript start routine, change the parameter in the file to the NETWORKING_IPV6 /etc/sysconfig/network followi Ng

    NETWORKING_IPV6=no
  6. For completeness, it's a good idea to configure the ip6tables service not to start at boot by issuing the following command:

    # chkconfig ip6tables off
  7. Reboot the system to disable IPV6 support.

Re-enabling IPv6 support in Red Hat Enterprise Linux 5
    1. Remove the following lines (if present) from the /etc/modprobe.conf file:

      alias net-pf-10 offalias ipv6 offoptions ipv6 disable=1
    2. Add the following line to the /etc/modprobe.conf file (if not present already):

      alias net-pf-10 ipv6
    3. The parameter in the file to the NETWORKING_IPV6 /etc/sysconfig/network following:

      NETWORKING_IPV6=yes
    4. For completeness, it's a good idea to configure the ip6tables service to start at boot by issuing the following command:

      # chkconfig ip6tables on
    5. Reboot the system to re-enable IPV6 support.

Disabling IPV6 support in Red Hat Enterprise Linux 4
    1. Remove the following line (if present) from the /etc/modprobe.conf file:

      alias net-pf-10 ipv6
    2. Add the following line to the /etc/modprobe.conf file:

      alias net-pf-10 off
    3. Reboot the system to disable IPV6 support.

Re-enabling IPv6 support in Red Hat Enterprise Linux 4
    1. Remove the following line from the /etc/modprobe.conf file:

      alias net-pf-10 off
    2. Add the following line to the /etc/modprobe.conf file:

      alias net-pf-10 ipv6
    3. Reboot the system to re-enable IPV6 support.

Related Article

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.