Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          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)
          Interrupt:14
share|improve this question
    
Go ahead and post /etc/sysconfig/network-scripts/ifcfg-eth0 as well. –  Scott Pack Sep 22 '11 at 18:33

1 Answer 1

up vote 5 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
/etc/sysconfig/network
Make sure to set the variable
NETWORKING_IPV6=no

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

 
discard

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.