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
Create a file
/etc/modprobe.d/ipv6.confwith the following contents:options ipv6 disable=1
For completeness, it is a good idea to configure the
ip6tablesservice not to start at boot by issuing the following command:# chkconfig ip6tables off
Edit
/etc/sysconfig/networkand add the lineNETWORKING_IPV6=noDisable 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
Optionally to prevent
rpc.nfsdsetting up IPv6 sockets while NFS server is running, edit/etc/netconfigfor the lines starting with udp6 and tcp6; change the"v"in the third column to"-"(hyphen/dash)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
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
Configure the
ip6tablesservice to start at boot by issuing the following command:# chkconfig ip6tables on
Edit
/etc/sysconfig/networkand add the lineNETWORKING_IPV6=yesMake sure the following options to your
/etc/sysctl.confare# ipv6 support in the kernel, set to 0 by default
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
Edit
/etc/netconfigfor the lines starting with udp6 and tcp6; change the"-"(hyphen/dash) in the third column to"v"Reboot the system to activate IPv6 support.
Disabling IPv6 support in Red Hat Enterprise Linux 5
Remove the following line (if present) from the
/etc/modprobe.conffile:alias net-pf-10 ipv6
Add the following line to the
/etc/modprobe.conffile:alias net-pf-10 off
In versions of Red Hat Enterprise Linux before 5.4, add the following line to the
/etc/modprobe.conffile:alias ipv6 off
In Red Hat Enterprise Linux 5.4 and later, add the following line to the
/etc/modprobe.conffile:options ipv6 disable=1
To prevent errors during the network initscript start routine, change the
NETWORKING_IPV6parameter in the/etc/sysconfig/networkfile to the following:NETWORKING_IPV6=no
For completeness, it is a good idea to configure the
ip6tablesservice not to start at boot by issuing the following command:# chkconfig ip6tables off
Reboot the system to disable IPv6 support.
Re-enabling IPv6 support in Red Hat Enterprise Linux 5
Remove the following lines (if present) from the
/etc/modprobe.conffile:alias net-pf-10 off
alias ipv6 off
options ipv6 disable=1
Add the following line to the
/etc/modprobe.conffile (if not present already):alias net-pf-10 ipv6
Change the
NETWORKING_IPV6parameter in the/etc/sysconfig/networkfile to the following:NETWORKING_IPV6=yes
For completeness, it is a good idea to configure the
ip6tablesservice to start at boot by issuing the following command:# chkconfig ip6tables on
Reboot the system to re-enable IPv6 support.
Disabling IPv6 support in Red Hat Enterprise Linux 4
Remove the following line (if present) from the
/etc/modprobe.conffile:alias net-pf-10 ipv6
Add the following line to the
/etc/modprobe.conffile:alias net-pf-10 off
Reboot the system to disable IPv6 support.
Re-enabling IPv6 support in Red Hat Enterprise Linux 4
Remove the following line from the
/etc/modprobe.conffile:alias net-pf-10 off
Add the following line to the
/etc/modprobe.conffile:alias net-pf-10 ipv6
Reboot the system to re-enable IPv6 support.
Disable or enable the IPv6 protocol in Red Hat Enterprise Linux的更多相关文章
- How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 7
How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 7 $ Solution 已验证 - 已更新2017年六月 ...
- How to use, monitor, and disable transparent hugepages in Red Hat Enterprise Linux 6
Resolution Note: Transparent Huge Pages are not available on the 32-bit version of RHEL 6. Transpare ...
- 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 Scientif ...
- 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 ...
- Configure Red Hat Enterprise Linux shared disk cluster for SQL Server——RHEL上的“类”SQL Server Cluster功能
下面一步一步介绍一下如何在Red Hat Enterprise Linux系统上为SQL Server配置共享磁盘集群(Shared Disk 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 performan ...
- Common administrative commands in Red Hat Enterprise Linux 5, 6, and 7
https://access.redhat.com/articles/1189123 Common administrative commands in Red Hat Enterprise Linu ...
- Configure Red Hat Enterprise Linux shared disk cluster for SQL Server
下面一步一步介绍一下如何在Red Hat Enterprise Linux系统上为SQL Server配置共享磁盘集群(Shared Disk Cluster)及其相关使用(仅供测试学习之用,基础篇) ...
- Red Hat Enterprise Linux 7.x新特性
Red Hat Enterprise Linux 7.x新特性 RHEL7新特性简介 1. RHEL7目前支持架构 64-bit AMD.64-bit Intel.IBM POWER.IBM ...
随机推荐
- ES6笔记03-Set和Map数据结构
ES6提供了新的数据结构Set.它类似于数组,但是成员的值都是唯一的,没有重复的值.Set本身是一个构造函数,用来生成Set数据结构. var s = new Set(); [2, 3, 5, 4, ...
- Elasticsearch和Head插件安装
环境: CentOS7 Elasticsearch-6.3.2 JDK8 准备: JDK8 下载地址:http://www.oracle.com/technetwork/java/javase/do ...
- POJ 3608 凸包间最短距离(旋转卡壳)
Bridge Across Islands Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11539 Accepted: ...
- 笔记-HTTP及HTTPS
笔记-HTTP及HTTPS 1. HTTP 1.1. 简介 HTTP:hyper text transfer protocol 超文本传输协议 http常用请求方式,method ge ...
- 关于原生JS获取class,ID等属性的一些封装
一.传统上获取是通过document.getElementById获取元素的ID属性,通过总结与学习总结一下获取元素class以及id属性的一些封装; 1.创建构造函数,这里面不需要多解释什么:(主要 ...
- 7 Django的模板层
你可能已经注意到我们在例子视图中返回文本的方式有点特别. 也就是说,HTML被直接硬编码在 Python代码之中. def current_datetime(request): now = datet ...
- startActivityForResult 请求码不正确
今天遇到一个坑,就是 startActivityForResult 接收不到正确的请求码. 比如,我startActivityForResult的时候,设置的请求码是4,但是接收到的时候是100032 ...
- 《Cracking the Coding Interview》——第9章:递归和动态规划——题目5
2014-03-20 03:23 题目:给定一个字符串,输出其全排列. 解法:可以调用STL提供的next_permutation(),也可以自己写一个.对于这种看起来简单的题目,应该在能优化的地方, ...
- python学习笔记六:内置函数
一.数学相关 1.绝对值:abs(-1) 2.最大最小值:max([1,2,3]).min([1,2,3]) 3.序列长度:len('abc').len([1,2,3]).len((1,2,3)) 4 ...
- SQL Server VALUES 使用一记住
VALUES 用得最多,最常见的就是 INSER INOT 表名(列名1,列名2,......) VALUES(值1,值2,......) ------------------------------ ...