Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to disable IPV6 in the new Centos6 virtual server I have just setup in Xen. I have already followed the instructions here and then rebooted/restarted networking.

Update: followed the below, that seems to have worked, but now it hasn't picked up an ipv4 address?

eth0      Link encap:Ethernet  HWaddr 9A:F0:43:47:04:F1 
          RX packets:941 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:89952 (87.8 KiB)  TX bytes:0 (0.0 b)
share|improve this question
Go ahead and post /etc/sysconfig/network-scripts/ifcfg-eth0 as well. – Scott Pack Sep 22 '11 at 18:33
up vote 8 down vote accepted

You need to make changes in a few different places.

First, disable IPv6 in the user-land network configuration scripts by modifying the file
Make sure to set the variable

Next disable the ipv6 kernel module. You should be able to create a new modprobe.d file to disable it, or outright blacklist it. So either

  1. Create a new file /etc/modprobe.d/ipv6.conf containing

alias net-pf-10 off
alias ipv6 off

  1. Add the following lines to /etc/modprobe.d/blacklist.conf

blacklist net-pf-10
blacklist ipv6

IPTables is enabled by default, and has a separate service for IPv4 and v6, so we need to disable the v6 version as well.

service ip6tables stop
chkconfig ip6tables off

In theory, once all this is set up, you should be able to restart networking, and unload the module. However, you may require a full reboot to make sure all the cruft is cleaned up. After doing this I would recommend verifying that the disable took by looking at the loaded modules, your running network config, listening/sockets, etc for any v6 indicators.

share|improve this answer
Odd that the CentOS FAQ doesn't cover this info, which will really disable IPv6 instead of not. Thanks Scott. – mbrownnyc Sep 18 '12 at 17:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.