RHEL 7 & CentOS 7 Disable IPV6

Source: Internet
Author: User

RHEL 7 & CentOS 7 To disable the IPV6 method and the previous version is not the same, this article sorted out the processing method: The source of this article: http://blog.csdn.net/bluishglc/article/details/ 41390785 prohibit any form of reprint, otherwise will entrust CSDN official safeguard rights and interests.


First, we have to give the most fundamental solution: modify grub to not load the IPV6 module at boot time



After this modification, use the


# Lsmod | grep ipv6


For verification.


Let's look at a way to deal with it, which is not as thorough as the one mentioned above, but also effective.
Verify IPV6 is off

1. By order:

Check to the If you ' re installation are currently set up for IPV6:

# Cat/proc/sys/net/ipv6/conf/all/disable_ipv6


If the output is 0, IPV6 is enabled.

If the output is 1, IPV6 is already disabled.


Specifically: In this way, using # Lsmod | grep ipv6 will still have some related modules listed.

2. Through Ifconfig view the network card information, the following open and close the difference of IPv6:


to disable IPV6 procedures

Step 1:add This rule in/etc/sysctl.conf: net.ipv6.conf.all.disable_ipv6=1

Step 2:add This rule in/etc/sysconfig/network: networking_ipv6=no

Step 3:add This setting to each NIC X (x was the corresponding number for each NIC) in/etc/sysconfig/network-scripts/ifc FG-ETHX: ipv6init=no

Step 4:disable The Ip6tables service: chkconfig ip6tables off

Step 5:reload The Sysctl configuration:

# sysctl-p
Or
# reboot


Note: Disabling IPV6 may cause some services to fail to start, such as Vsftp, and for vsftp, you need to modify the listen and Listen_ipv6 two options in the/etc/vsftpd/vsftpd.conf file:
Listen=yes Listen_ipv6=no



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.