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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS / RHEL 6 : How to disable IPv6

by admin

Post describes procedure to disable IPv6 on CentOS/RHEL 6. There are 2 ways to do this :
1. Disable IPv6 in kernel module (requires reboot)
2. Disable IPv6 using sysctl settings (no reboot required)

Method 1 : using /etc/modprobe.d/ipv6.conf

1. Check if IPV6 is enabled:

# ifconfig |grep inet6
  inet6 addr: fe80::d6be:d9ff:fe99:5a77/64 Scope:Link
  inet6 addr: fe80::d6be:d9ff:fe99:5a77/64 Scope:Link

2. Create /etc/modprobe.d/ipv6.conf if not already present with below parameter:

options ipv6 disable=1

3. Disable ipt6tables service

# chkconfig ip6tables off

4. Reboot the server

# shutdown -r now

5. Confirm if IPV6 is disabled:

# ifconfig |grep inet6
#

Method 2 : Using /etc/sysctl.conf

1. Append below line to the file /etc/sysctl.conf.

# IPv6 support in the kernel, set to 0 by default
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

2. To make the settings affective, execute :

# sysctl -p
CentOS / RHEL 7 : How to disable IPv6

Filed Under: Linux

Some more articles you might also be interested in …

  1. How to disable NetworkManager on CentOS / RHEL 7
  2. CentOS / RHEL : How to resize (extend) existing Physical Volume (PV)
  3. The /var/log/messages is empty, and so are the rotated log files such as messages.0, messages.1
  4. A File Is Claimed to Be Disappearing – How to monitor a file for deletion in Linux
  5. How to Create a Custom Log File Rotation by logrotate in Linux
  6. Understanding the Network interface configuration file /etc/sysconfig/network-scripts/ifcfg-eth#
  7. e2fsck Command Examples in Linux
  8. Understanding Samba utilities – nmblookup, smbstatus, smbtar, testparm, wbinfo, smbget
  9. hdiutil Command Examples in Mac
  10. mkfs.exfat: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • What are /dev/zero and /dev/null files in Linux
  • grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.
  • xxd command – Expressed in hexadecimal form
  • sesearch: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright