• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Mister PKI

SSL Certificates * SSL Tools * Certificate Decoder

  • Buy SSL Certificates
  • Blog
  • OpenSSL
  • Keytool
  • SSL Tools
  • Donate

Redhat Disable IPv6

February 10, 2023 by Mister PKI Leave a Comment

This article will demonstrate how to in Redhat disable the IPv6 protocol. This is especially useful and common in private networks that have no need to support IPv6. Private networks usually have more than enough IPv4 addresses, and enabling IPv6 can introduce a number of unexpected networking issues.

IPv6 identifies a computer or node on a network the same as IPv4, with the difference being a much larger set of addresses to choose from.

The examples in this article are based on RHEL 8.7 Ootpa.

cat /etc/redhat-release
Red Hat Enterprise Linux release 8.7 (Ootpa)

Note that privileged access is required to disable and enable IPv6 at the system level.

Redhat 8 Disable IPv6

Temporarily disable IPv6

To temporarily disable IPv6 on Redhat, use the sysctl utility.

sysctl -w net.ipv6.conf.all.disable_ipv6=1

Permanently disable IPv6

To permanently disable IPv6 on Redhat you must modify the GRUB boot menu.

First, display the kernelopts argument list.

# grub2-editenv - list | grep kernelopts
kernelopts=root=/dev/mapper/rhel-root ro crashkernel=auto resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet

Then append the ipv6.disable=1 to the output of the previous command.

# grub2-editenv - set "kernelopts=root=/dev/mapper/rhel-root ro crashkernel=auto resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet ipv6.disable=1"

Reboot your system and verify IPv6 is disabled. Now that IPv6 is enabled at a system level permanently, if you need to re-enable it temporarily for testing, move on to the next section.

Disable IPv6 for a specific connection

To disable IPv6 for a specific connection or device in Redhat, use the Network Manager nmcli utility.

nmcli connection modify <device> ipv6.method "disabled"

The restart Network Manager and the device.

systemctl restart NetworkManager
nmcli con down <device> && nmcli con up <device>

Redhat 8 Enable IPv6

Temporarily enable IPv6

To temporarily enable IPv6 on Redhat, use the sysctl utility.

sysctl -w net.ipv6.conf.all.disable_ipv6=0

Permanently enable IPv6

To permanently enable IPv6 on Redhat, undo the “permanently disable IPv6” commands defined previously in this article.

Confirm IPv6 is disabled

To confirm that IPv6 has been disabled on Redhat, run the following command.

ip a | grep inet6

If no results are returned you know that IPv6 is disabled. All of the addresses should be IPv4, defined by inet.

Alternatively, you can show the specific device or connection IPv6 status.

ip a show <device>

To verify IPv6 is disabled for a specific device, look in the configuration file for that device.

cat /proc/sys/net/ipv6/conf/<device>/disable_ipv6

0 – enabled

1 – disabled

Conclusion

This article has demonstrated how to enable and disable IPv6 in Redhat both temporarily and permanently. Leave us a comment if you have any questions or would like to see additional examples of managing IPv6 in Redhat. Go here to read more of our articles.

linux,  redhat

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Popular Posts

PKCS12

openssl s_client

Keytool

Keytool list

ECDSA vs RSA

OpenSSL

PKCS7

Certificate Decoder

Training Courses

Top online courses in IT & Software

Cyber Security Training

Udemy - The Complete Internet Security Privacy Course icon

Buy SSL Certificates

The SSL Store

Comodo Store

Sectigo Store

RapidSSL

Recent Posts

  • Redhat Disable IPv6
  • Linux ls human readable file size
  • Show linux directory size
  • Sendmail vs Postfix – Mail Transfer Agent Comparison
  • DNS Powershell

Footer

  • Twitter
  • YouTube

Pages

  • About Mister PKI
  • Blog
  • Compare and Buy Affordable PKI Certificates
  • Contact Us
  • Full Disclosure
  • Privacy Policy
  • SSL Tools – Certificate Decoder and Certificate Checker

Copyright © 2023