An Internet Protocol Version 6 (IPv6) address is an identifier of a network interface of a computer or a network node involved in an IPv6 computer network. This article will guide the user via simple steps on how to disable or re-enable IPv6 network addresses on Red Hat Enterprise Linux 8. To temporarily enable/disable the IPv6 address on Redhat 8 we will use the sysctl command. Additionally, to permanently disable the IPv6 address we will modify the GRUB boot options.

In this tutorial you will learn:
  • How to temporarily disable the IPv6 address.
  • How to permanently disable IPv6 by modifying the GRUB boot options.
Enabled IPv6 on RHEL 8 Linux system.
Enabled IPv6 on RHEL 8 Linux system.

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Red Hat Enterprise Linux 8
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ - requires given linux commands to be executed as a regular non-privileged user

How to disable IPv6 on Redhat 8 step by step instructions

  1. To temporarily disable IPv6 address execute the following command from your terminal with administrative privileges:
    # sysctl -w net.ipv6.conf.all.disable_ipv6=1
    

  2. SUBSCRIBE TO NEWSLETTER
    Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


  3. Confirm that IPv6 network addresses are disabled. Run the ip command and check for any inet6 address allocations:
    # ip a 
    
  4. Disabled IPv6 network addresses on RHEL 8 Linux Server/Workstation
    Disabled IPv6 network addresses on RHEL 8 Linux Server/Workstation.
  5. Permanently disable IPv6 network address allocations by modifying the GRUB boot menu. First obtain the current kernelopts argument list: For example:
    # 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
    
    Next, append a new argument ipv6.disable=1 to the previously received kernelopts argument list: For example:
    # 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"
    


    Modify GRUB boot arguments do disable IPv6 on RHEL 8 Linux system
    How to modify GRUB boot arguments do disable IPv6 on the RHEL 8 Linux system.
  6. Reboot your system to apply changes. Alternatively simply disable IPv6 as per STEP 1
  7. In case you need to re-enable the IPv6 address execute:
    # sysctl -w net.ipv6.conf.all.disable_ipv6=0
    
    If you have also modified GRUB boot to disable IPv6 as per above instructions use the grub2-editenv command to remove the ipv6.disable=1 argument.
ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed on LinuxCareers.com.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.