Disable or enable the IPv6 protocol in Red Hat Enterprise Linux

Resolution

Red Hat Enterprise Linux 4, 5 and 6 enable Internet Protocol Version 6 (IPv6) by default. However, in certain situations, some users may find it desirable to disable IPv6 support or to re-enable it after it has been 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 /etc/modprobe.d/ipv6.conf with the following contents:

    options ipv6 disable=1
    
  2. For completeness, it is a good idea to configure the ip6tables service not to start at boot by issuing the following command:
    # chkconfig ip6tables off
    
  3. Edit /etc/sysconfig/network and add the line NETWORKING_IPV6=no
  4. Disable ipv6 support in the kernel through /etc/sysctl.conf :
    # ipv6 support in the kernel, set to 0 by default
    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.default.disable_ipv6 = 1
    
  5. Optionally to prevent rpc.nfsd setting up IPv6 sockets while NFS server is running, edit /etc/netconfig for the lines starting with udp6 and tcp6; change the "v" in the third column to "-"(hyphen/dash)
  6. Reboot the system to disable IPv6 support.

Note: There is a special case where this might not work, please see The "ipv6 disable=1" option does not seem to work on Red Hat Enterprise Linux 6 system.
Disabling ipv6 in the sysctl.conf will ensure ipv6 isn‘t used even if the ipv6 module is loaded and can work as a short term solution (until a full reboot)

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

    options ipv6 disable=1
    install ipv6 /bin/true
    blacklist ipv6
    
  2. Configure the ip6tables service to start at boot by issuing the following command:
    # chkconfig ip6tables on
    
  3. Edit /etc/sysconfig/network and add the line NETWORKING_IPV6=yes
  4. Make sure the following options to your /etc/sysctl.conf are
    # ipv6 support in the kernel, set to 0 by default
    net.ipv6.conf.all.disable_ipv6 = 0
    net.ipv6.conf.default.disable_ipv6 = 0
    
  5. Edit /etc/netconfig for the 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 NETWORKING_IPV6 parameter in the /etc/sysconfig/network file to the following:
    NETWORKING_IPV6=no
    
  6. For completeness, it is 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 off
    alias ipv6 off
    options ipv6 disable=1
    
  2. Add the following line to the /etc/modprobe.conf file (if not present already):
    alias net-pf-10 ipv6
    
  3. Change the NETWORKING_IPV6 parameter in the /etc/sysconfig/network file to the following:
    NETWORKING_IPV6=yes
    
  4. For completeness, it is 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.

Disable or enable the IPv6 protocol in Red Hat Enterprise Linux

时间: 2024-10-06 13:23:18

Disable or enable the IPv6 protocol in Red Hat Enterprise Linux的相关文章

setting up a IPSEC/L2TP vpn on CentOS 6 or Red Hat Enterprise Linux 6 or Scientific Linux

This is a guide on setting up a IPSEC/L2TP vpn on CentOS 6 or Red Hat Enterprise Linux 6 or Scientific Linux 6 using Openswan as the IPsec server, xl2tpd as the l2tp provider and ppp for authentication. We choose the IPSEC/L2TP protocol stack because

Configure Red Hat Enterprise Linux shared disk cluster for SQL Server

下面一步一步介绍一下如何在Red Hat Enterprise Linux系统上为SQL Server配置共享磁盘集群(Shared Disk Cluster)及其相关使用(仅供测试学习之用,基础篇) 一.      创建共享磁盘和 Cluster 微软官方配置文档:https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-shared-disk-cluster-red-hat-7-configure. Linux Cluster结构

Configure Red Hat Enterprise Linux shared disk cluster for SQL Server——RHEL上的“类”SQL Server Cluster功能

下面一步一步介绍一下如何在Red Hat Enterprise Linux系统上为SQL Server配置共享磁盘集群(Shared Disk Cluster)及其相关使用(仅供测试学习之用,基础篇) 一.      创建共享磁盘和 Cluster 微软官方配置文档:https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-shared-disk-cluster-red-hat-7-configure. Linux Cluster结构

[转] KVM storage performance and cache settings on Red Hat Enterprise Linux 6.2

Almost one year ago, I checked how different cache settings affected KVM storage subsystem performance. Results were very clear: to obtain good I/O speed, you had to use the write-back or none cache policies, avoiding the write-through one. However,

Deploy Oracle 10.2.0.5 DataGuard on Red Hat Enterprise Linux 6.4

系统:Red Hat Enterprise Linux 6.4 数据库:Oracle 10.2.0.5.0 Patch Set 4 主机:10dg1 192.168.1.91 10dg2192.168.1.92 内存:1G 虚拟机:VBox 4.2.14 一,操作系统部分(略) 可以参考我之前写的博客 http://blog.csdn.net/aaron8219/article/details/38239065 二,数据库部分 *****主库配置***** 1. 开启归档,force loggi

Red Hat Enterprise Linux 7.x新特性

Red Hat Enterprise Linux 7.x新特性 RHEL7新特性简介 1.      RHEL7目前支持架构 64-bit AMD.64-bit Intel.IBM POWER.IBM System z,不再支持x86 32bit 2.      RHEL7安装界面 启动程序改为grub2.systemd:全新的安装界面:一站式的安装配置:全新的kickstart结构:全新的分区工具:支持2TB以上硬盘作为系统引导盘安装配置步骤较大变化. 3.      UID rhel7的普通

SQL Server on Red Hat Enterprise Linux

本文从零开始一步一步介绍如何在Red Hat Enterprise Linux上搭建SQL Server 2017,包括安装系统.安装SQL等相关步骤和方法(仅供测试学习之用,基础篇). 一.   创建RHEL系统(Create Red Hat Enterprise Linux System) 1.      前提准备 由于本文主要研究SQL Server 2017在Linux上的搭建方法,从Install SQL Server on Linux中得知当前SQL Server 2017 CTP

Red Hat Enterprise Linux 7的新功能

?? 简介红帽最新版本的旗舰平台交付显著增强的可用性. 性能和可靠性. 丰富的新功能为架构. 系统管理员和开发人员提供所需的资源以更高效地进行创新和管理.架构师: 红帽® 企业 Linux® 7 适合您选择的任意基础架构, 它可以高效地与其他操作环境. 身份验证和管理系统集成到一起. 无论您是要构建网络密集型应用程序. 可大规模扩展的数据资料库, 亦或是一次构建而成但会频繁部署的并在物理. 虚拟和云环境中表现良好的解决方案, 红帽企业 Linux 7 都提供了必要的功能来支持您的项目.系统管理员

SQL Server on Red Hat Enterprise Linux——RHEL上的SQL Server(全截图)

本文从零开始一步一步介绍如何在Red Hat Enterprise Linux上搭建SQL Server 2017,包括安装系统.安装SQL等相关步骤和方法(仅供测试学习之用,基础篇). 一.   创建RHEL系统(Create Red Hat Enterprise Linux System) 1.      前提准备 由于本文主要研究SQL Server 2017在Linux上的搭建方法,从Install SQL Server on Linux中得知当前SQL Server 2017 CTP