Follow these steps to disable IPv6 on CentOS. Edit the /etc/sysctl.conf file, I will use the nano editor here:

nano /etc/sysctl.conf

And add the following line at the end of the file:

net.ipv6.conf.all.disable_ipv6 = 1

Then run:

sysctl -p

to load the new settings.

The next step is to edit the network card configuration file (/etc/sysconfig/network-scripts/ifcfg-eth*) and add or edit the setting IPV6INIT so that it is set to "no".


Now edit the file /etc/sysconfig/network:

nano /etc/sysconfig/network

And set the NETWORKING_IPV6 option to "no":


Then restart the server.

Disable IPv6 networking on CentOS

One thought on “Disable IPv6 networking on CentOS

  • Avatar
    November 17, 2015 at 10:29 pm

    You can also add “ipv6.disable=1″ to grub (/etc/default/grub) so it looks like GRUB_CMDLINE_LINUX=”existing_stuff ipv6.disable=1” and reboot your server.


Leave a Reply

Your email address will not be published. Required fields are marked *