Well, i will not recommend to do this as it may cause some problem to networking on your server.
But, for those who want to do this here is the solution.
On CentOS mostly we do not need ipv6 as network configuration are done on ipv4. So to disable Ipv6 networking and prevent kernel module from loading at boot time and disable IPv6 networking we have to do update two files :
1. /etc/modprobe.conf – Kernel driver configuration file.
2. /etc/sysconfig/network – RHEL / CentOS networking configuration file.
First, we will edit /etc/modprobe.conf file :
-----
# vi /etc/modprobe.conf
-----
We have to append this line in it.
-----
install ipv6 /bin/true
-----
Now, save the file and close it.
Second, we will edit /etc/sysconfig/network file :
-----
# vi /etc/sysconfig/network
-----
Kindly update the given below details
-----
NETWORKING_IPV6=no
IPV6INIT=no
-----
Now, save the file and close it.
You have to restart the networking services now to reflect the changes.
-----
# service network restart
# rmmod ipv6
-----
Also, reboot the box too
-----
# reboot
-----
You can check and verify the ipv6 status through :
-----
# lsmod | grep ipv6
# /sbin/ifconfig
-----
But, for those who want to do this here is the solution.
On CentOS mostly we do not need ipv6 as network configuration are done on ipv4. So to disable Ipv6 networking and prevent kernel module from loading at boot time and disable IPv6 networking we have to do update two files :
1. /etc/modprobe.conf – Kernel driver configuration file.
2. /etc/sysconfig/network – RHEL / CentOS networking configuration file.
First, we will edit /etc/modprobe.conf file :
-----
# vi /etc/modprobe.conf
-----
We have to append this line in it.
-----
install ipv6 /bin/true
-----
Now, save the file and close it.
Second, we will edit /etc/sysconfig/network file :
-----
# vi /etc/sysconfig/network
-----
Kindly update the given below details
-----
NETWORKING_IPV6=no
IPV6INIT=no
-----
Now, save the file and close it.
You have to restart the networking services now to reflect the changes.
-----
# service network restart
# rmmod ipv6
-----
Also, reboot the box too
-----
# reboot
-----
You can check and verify the ipv6 status through :
-----
# lsmod | grep ipv6
# /sbin/ifconfig
-----