Skip to content

Instantly share code, notes, and snippets.

@jmenbo
Last active February 27, 2016 21:58
Show Gist options
  • Save jmenbo/184cd81eae1c33cd5984 to your computer and use it in GitHub Desktop.
Save jmenbo/184cd81eae1c33cd5984 to your computer and use it in GitHub Desktop.
Disable IPv6 in CentOS 6.x

Disable IPv6 in CentOS 6.x

1) Add the file:

/etc/modprobe.d/ipv6.conf

With the following contents:

# Disabling ipv6
options ipv6 disable=1

2) Add the following lines to /etc/sysctl.conf:

# Disable IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

3) For systems with multiple NICs on different subnets:

On /etc/sysctl.conf change the following:

net.ipv4.conf.default.rp_filter = 1

To this:

net.ipv4.conf.default.rp_filter = 2

This change is needed due to a routing "bug" on CentOS 6.x. See [here] (http://z-issue.com/wp/linux-rhel-6-centos-6-two-nics-in-the-same-subnet-but-secondary-doesnt-ping/) for partial explanation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment