RedHat / Centos Disable IPv6 Networking
To disable IPv6 networking on RedHat/CentOS, you need to modify the network configuration file. Here are the steps:
- Open the
/etc/sysctl.conffile with a text editor:sudo vi /etc/sysctl.conf - Add the following lines at the end of the file:
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 - Save and close the file.
- To apply the changes, run the following command:
sudo sysctl -pThis will reload the system settings, including the network configuration.
- Restart the networking service to make sure the changes take effect:
sudo systemctl restart networkThis will restart the networking service and disable IPv6.
ifconfig command and checking for any IPv6 addresses. If there are no IPv6 addresses, then IPv6 networking is successfully disabled.