How to Find IPv6 Address and Disable IPv6 Permanently in Linux 8 (RHEL / Oracle Linux / CentOS)
IPv6 is enabled by default on most Linux 8 servers such as Red Hat Enterprise Linux 8 (RHEL 8), Oracle Linux 8, and CentOS 8. In some environments, IPv6 can create network issues such as DNS delays, connection timeout errors, slow application connectivity, or database connection problems.
This guide explains step-by-step how to check IPv6 IP address and disable IPv6 permanently on Linux 8 using sysctl configuration (without GRUB method).
Why Disable IPv6 on Linux 8?
Many enterprise applications still rely mainly on IPv4. If IPv6 is enabled, Linux may try IPv6 first during hostname resolution. This can lead to:
- Slow server response due to IPv6 DNS lookup delay
- Application connection timeout issues
- Database connection timeout (Oracle, MySQL, PostgreSQL)
- MuleSoft integration timeout problems
- Firewall routing issues
For stable connectivity, system administrators often disable IPv6 completely in Linux servers.
Step 1: Check IPv6 Address in Linux 8
To find the IPv6 address configured on your Linux 8 server, run the following command:
ip -6 addr show
Typical output may include:
- ::1/128 - IPv6 loopback address
- fe80::xxxx/64 - Link-local IPv6 address (auto-generated)
If you see an IPv6 address starting with fe80::, it confirms IPv6 is active on your network interface.
Step 2: Verify Whether IPv6 is Enabled or Disabled
To confirm the current IPv6 status in Linux 8, check the below file:
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
Output meaning:
- 0 = IPv6 is enabled
- 1 = IPv6 is disabled
Step 3: Disable IPv6 Temporarily (Testing Purpose)
If you want to disable IPv6 immediately (only until reboot), run the following sysctl commands:
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1 sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
Now verify again:
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
Expected output:
1
Note: This method is temporary. After reboot, IPv6 will be enabled again unless you configure it permanently.
Step 4: Disable IPv6 Permanently in Linux 8 (Recommended)
To permanently disable IPv6 in Linux 8, create a sysctl configuration file under /etc/sysctl.d/.
Create a sysctl config file
sudo vi /etc/sysctl.d/99-disable-ipv6.conf
Add the following lines into the file:
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1
Save the file and exit.
Step 5: Apply the Changes
After saving the sysctl file, apply the configuration by running:
sudo sysctl --system
This command reloads all kernel parameters from sysctl configuration files.
Step 6: Confirm IPv6 is Disabled
Check the IPv6 disable flag again:
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
Expected output:
1
Now check the IPv6 IP addresses:
ip -6 addr show
If IPv6 is successfully disabled, you should not see any IPv6 address assigned to interfaces.
Step 7: Restart Network Manager (Optional)
In some cases, the IPv6 address may still appear until the network service is restarted. Restart NetworkManager using:
sudo systemctl restart NetworkManager
Verify again:
ip -6 addr show
Conclusion
Disabling IPv6 in Linux 8 is a common practice in enterprise environments where applications depend heavily on IPv4. Using sysctl configuration is the safest and simplest method to permanently disable IPv6 without changing GRUB settings.
Quick Commands Summary
- Check IPv6 Address:
ip -6 addr show - Check IPv6 Status:
cat /proc/sys/net/ipv6/conf/all/disable_ipv6 - Disable IPv6 Permanently: Create
/etc/sysctl.d/99-disable-ipv6.confand reload sysctl
If you are facing issues like Oracle database connection timeout, MuleSoft connection issues, or slow DNS resolution, disabling IPv6 may improve network stability.
Please do like and subscribe to my youtube channel: https://www.youtube.com/@foalabs If you like this post please follow,share and comment

Post a Comment
Post a Comment