ADVERTISEMENT
![Disable IPv6 On CentOS 8](https://linuxpunx.com/wp-content/uploads/2021/03/how-to-disable-ipv6-on-centos-8-rhel-8.jpg)
Most of the organizations still use IPv4 for network communications and not in need of IPv6. In these cases, your system doesn’t need to support IPv6.
![IPv6 Enabled On Network Interfaces](https://linuxpunx.com/wp-content/uploads/2021/03/how-to-disable-ipv6-on-centos-8-rhel-8-1.jpg)
This post helps you to disable IPv6 on CentOS 8 / RHEL 8.
THIS DOCUMENT IS ALSO AVAILABLE FOR
Disable IPv6 On CentOS 8 / RHEL 8
Contents
IPv6 can be disabled either by using sysctl.conf or by placing .conf file in the /etc/sysctl.d directory. CentOS 8 supports the disabling of IPv6 for all interfaces or specific to a particular network interface.
Method 1: systctl.d
Create a file called disableipv6.conf in /etc/sysctl.d directory.
vi /etc/sysctl.d/disableipv6.conf
Place the following entry to disable IPv6 for all adapter
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1
You can use the following entry to disable IPv6 for a particular network interface. (Assuming that the network card name is enp0s3).
net.ipv6.conf.enp0s3.disable_ipv6 = 1
Run the following command to reflect the changes.
systemctl restart systemd-sysctl
Method 2: sysctl.conf
Edit the /etc/sysctl.conf file.
vi /etc/sysctl.conf
Place the following entry to disable IPv6 for all adapter.
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1
You can use the following entry to disable IPv6 for a particular network interface. (Assuming that the network card name is enp0s3).
net.ipv6.conf.enp0s3.disable_ipv6 = 1
Run the following command to reflect the changes.
sysctl -p
Verify
Use the ifconfig command to see the network interfaces. You should see IPv6 address is no longer set on interfaces.
![IPv6 Disabled On Network Interfaces](https://linuxpunx.com/wp-content/uploads/2021/03/how-to-disable-ipv6-on-centos-8-rhel-8-2.jpg)
Conclusion
That’s All. I hope you learned how to disable IPv6 on CentOS 8 / RHEL 8. You can now proceed to configure IP Address on your CentOS 8 / RHEL 8 systems.