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.conf
with the following contents:options ipv6 disable=1
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
Edit
/etc/sysconfig/network
and add the lineNETWORKING_IPV6=no
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
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)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
ip6tables
service to start at boot by issuing the following command:# chkconfig ip6tables on
Edit
/etc/sysconfig/network
and add the lineNETWORKING_IPV6=yes
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
Edit
/etc/netconfig
for 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.conf
file:alias net-pf-10 ipv6
Add the following line to the
/etc/modprobe.conf
file:alias net-pf-10 off
In versions of Red Hat Enterprise Linux before 5.4, add the following line to the
/etc/modprobe.conf
file:alias ipv6 off
In Red Hat Enterprise Linux 5.4 and later, add the following line to the
/etc/modprobe.conf
file:options ipv6 disable=1
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
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
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.conf
file:alias net-pf-10 off
alias ipv6 off
options ipv6 disable=1
Add the following line to the
/etc/modprobe.conf
file (if not present already):alias net-pf-10 ipv6
Change the
NETWORKING_IPV6
parameter in the/etc/sysconfig/network
file to the following:NETWORKING_IPV6=yes
For completeness, it is a good idea to configure the
ip6tables
service 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.conf
file:alias net-pf-10 ipv6
Add the following line to the
/etc/modprobe.conf
file: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.conf
file:alias net-pf-10 off
Add the following line to the
/etc/modprobe.conf
file:alias net-pf-10 ipv6
Reboot the system to re-enable IPv6 support.
最新文章
- Android应用的安全的攻防之战
- Scrapy--1安装和运行
- AC日记——数字统计 openjudge 1.5 41
- android常用对话框封装
- MySql指令集
- configure: error: C++ compiler cannot create executables
- js方法控制html表格的增加和删除
- Creader VIII VS. Creader VII+
- jQuery中的阻止默认行为
- Spring in action(Spring实战) 第四版中文翻译
- 转:web_custom_request应用示例
- .NET MVC与三层架构
- web正则表达式与示例
- AngularJS–Animations(动画)
- android M Launcher之LauncherModel (三)
- Android 自定义 View 绘制
- Jmeter自带录制功能
- 《HTTP 权威指南》笔记:第三章 HTTP 报文
- 20155232 2016-2017-3 《Java程序设计》第8周学习总结
- dubbo在eclipse中无法读取到dubbo.xsd
热门文章
- IntelliJ IDEA 12 创建Web项目 教程 超详细版【转】
- 使用MyEclipse/Eclipse修改项目名称报Can't convert argument: null!
- 【jQeury】input输入框状态,input事件,blur事件,focus事件
- jQuery-laye插件实现 弹框编辑,异步验证,form验证提交
- 【UE4】二十三、UE4笔试面试题
- python, 面向对象编程Object Oriented Programming(OOP)
- 11.1,nginx集群概念
- 5. css定位 居中
- Java从数据库读取页面树形菜单
- 亲手搭建一个基于Asp.Net WebApi的项目基础框架3