Learning Academy

The Cure of Ignorance is to Question. MUHAMMAD (PBUH)

CentOS

How to Disable IPv6 Networking?

Question: Our policy and network configuration does not requires IPv6 support in RHEL / CentOS / Fedora Linux. How do I prevent the kernel module from loading at boot time and disable IPv6 networking?
You can easily prevent the kernel module from loading by updating the following two files:

1. /etc/modprobe.conf – Kernel driver configuration file.
2. /etc/sysconfig/network – RHEL / CentOS networking configuration file.

 

/etc/modprobe.conf

Edit /etc/modprobe.conf, enter:

vi /etc/modprobe.conf
# vi /etc/modprobe.conf

Append the following line:

install ipv6
/bin/true

Save and close the file.

/etc/sysconfig/network

Edit /etc/sysconfig/network, enter:

# vi /etc/sysconfig/network

Update / add as follows:

NETWORKING_IPV6=no
IPV6INIT=
no

Save and close the file. Restart networking service

# service network restart
# rmmod ipv6

Alternatively, simple reboot the box:

# reboot

Verify IPv6 is disabled, enter:

# lsmod | grep ipv6
# /sbin/ifconfig

Muhammad Shaukat

Content Developer at LearnAcad.com

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Pin It on Pinterest