Disabling ipv6 on a particular interface in CentOS 7

Disabling 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

About Anant 384 Articles
Senior technical writer