How to Disable IPv6 for Redhat and Centos

Some applications or policies require that IPv6 be disabled on the server, since the IPv6 protocol is currently not a requirement. This article will explain how to disable IPv6 for Redhat (Rhel) and CentOS based Linux servers.

Disabling IPV6

Log into the server via SSH.

Verify that IPv6 is indeed running by typing the following;

"lsmod | grep ipv6"

If it returns any output, then IPv6 is enabled and you will need to disable it.

Modify the "modprobe" file by opening it with a text editor. In this example we will use VI.

"vi /etc/modprobe.conf"

In the file you will need to append at the end of the file the following;

"install ipv6 /bin/true"

Be sure to save the changes to the file.

You will also need to modify the "/etc/sysconfig/network-scripts/ifcfg-eth0" file using VI and append it with the following;

"IPV6INIT=no"

"IPV6_AUTOCONF=no"

Be sure to save the changes to the file.

You will need to reboot the server in order for changes to take affect. Simply restarting the network service will not provide the required results.

Once the server is back online, log in and check to see if IPv6 is running by typing;

"lsmod | grep ipv6"

You will now see that no output is returned, showing that IPv6 is disabled.

  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

Installing htop

htop is an interactive process viewer for Linux, which is a powerful alternative to the...

Bind Multiple IP Addresses to a Single Network Interface Card (NIC)

This tutorial demonstrates how to bind multiple IP addresses to a single NICI'll be using LAN...

Clear Memory Cache on Linux Server

By default the Linux OS has a very efficient memory management process that should be freeing any...

Set the time on a Linux server

Log into the server via SSHAt the shell prompt run the following command:date MMDDHHmmYYYYFor...

Check your disk usage in Linux

A good way to check your disk usage for folders on your Linux server is via shell.Download...