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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • 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. rm Command Examples in Linux
  2. dot: Render an image of a linear directed network graph from a graphviz file
  3. umount: command not found
  4. rankmirrors Command Examples in Linux
  5. apport-bug Command Examples in Linux
  6. cpufreq-set Command Examples in Linux
  7. phar: command not found
  8. “git maintenance” Command Examples
  9. git commit: Commit files to the repository
  10. How to use sudo to allow a non-root user run a particular command

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright