How to Disable IPv6 in RHEL 8/CentOS 8/Oracle Linux 8

The internet has become an integral part of our lives, and networking protocols like IPv4 and IPv6 are the foundation of this technology. While IPv4 is the current standard for internet protocol, many experts believe that IPv6 will eventually replace it due to its improved security features.

IPv6 was developed to replace IPv4, which had become outdated due to its limited address space. IPv6 has a much larger address space, which allows for more devices to be connected to the internet.

IPv6 is an important part of the internet, however it is also a potential source of malicious traffic if not properly configured and manage. By disabling IPv6, it is possible to reduce the attack surface of a network and protect it from malicious actors. With IPv4-only networks, firewall rules can be implemented more easily and securely, making it harder for attackers to gain access to the network. This article will provide steps to disable IPv6 in RHEL 8/CentOS 8/Oracle Linux 8.

1. How to check whether IPv6 is enabled on your server :

# ip a | grep inet6

Output :

    inet6 ::1/128 scope host
    inet6 fe80::20c:29ff:fe31:2a7b/64 scope link


# ifconfig

2. Create /etc/sysctl.d/custom-ipv6.conf with following contents:

# vi /etc/sysctl.d/custom-ipv6.conf

3. Disable IPv6 use the following command.

# sysctl --load /etc/sysctl.d/custom-ipv6.conf

4. Verify again whether IPv6 is disabled on your server

Conclusion :

With the increasing use of the internet, it is becoming more important for everyone to understand and disable IPv6 in order to secure their network. IPv6 is a newer version of the Internet Protocol (IP) which provides users with more features and capabilities than its predecessor, IPv4. Although it has its advantages, it also comes with certain security risks that can be avoided by understanding and disabling IPv6.

Leave a Comment