Disabling ipv6 on a particular interface in CentOS 7

How to enable or disable ipv6
How to enable or disable ipv6

To enable and disable the ipv6  on a particular interface refer following parameter

net.ipv6.conf.[interface].disable_ipv6 = [value]

Interface : Use name of the interface, where you want to enable or disable the ipv6

i.e eth1, em1

Value : Use 0 to enable ipv6 and 1 to disable ipv6 on the interface.

For example, if we want to disable IPV6 on the eth0 interface Open the file “/etc/sysctl.conf” and add following line

net.ipv6.conf.eth0.disable_ipv6 = 1

Run following command to apply the changes immediately

sysctl -p

Senior technical writer

Be Sociable, Share!
About Anant 366 Articles
Senior technical writer