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

Mister PKI

SSL Certificates * SSL Tools * Certificate Decoder

  • PKI Training
  • OpenSSL
  • Keytool
  • PKI Tools
    • Apereo CAS
    • SAML
    • OpenID Connect
  • Get expert help

Redhat Disable IPv6

June 13, 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

RHEL6 Disable IPv6

To disable ipv6 in Redhat 6, edit the /etc/sysctl.conf file. Append the following lines to the sysctl.conf file.

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

After saving the file, run the following command.

sysctl -p

Make sure to perform these changes as the root user.

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

PKI for DevOps Engineers – Free Training Series

PKI for DevOps Training Hub

Lesson 1 – How TLS and PKI Work

Lesson 2 – Understanding X.509 Certificates

Lesson 3 – Certificate Chains Explained

Lesson 4 – Debug TLS with OpenSSL

Lesson 5 – Verify Certificate Chains

Lesson 6 – Creating CSRs with OpenSSL

Lesson 7 – Working with PKCS12 Certificates

Lesson 8 – Java Keystores and keytool

Lesson 9 – Certificate Expiration Monitoring

Lesson 10 – Automating Certificate Renewal

Lesson 11 – Common TLS Errors

Lesson 12 – PKI Architecture for DevOps

Recent Posts

  • Apache mod_auth_cas: Protect Web Applications with Apereo CAS and Docker
  • Apache mod_auth_mellon: Configure SAML SSO & Docker
  • Configure OpenID Connect (OIDC) in Apereo CAS 7.3 and 8
  • Certificate Ownership Is an Operating Model Problem, Not a Tooling Problem
  • OpenSSL dgst: Create Checksums and Verify Digital Signatures

Footer

  • Twitter
  • YouTube
Mister PKI

Practical security engineering for the systems that establish trust.

Learn OpenSSL Keytool Free training
Work together PKI consulting CAS consulting Sponsored contributions
Site About Support Mister PKI Cookie policy Search
© 2026 Mister PKI Secure systems. Clear guidance.