CentOS7にIPv6の無効化を設定する方法まとめ

2017年12月16日

方法 1:
設定ファイル
# vi /etc/sysctl.conf
Put the following entry to disable IPv6 for all adapter.

net.ipv6.conf.all.disable_ipv6 = 1
For particular adapter. (If the network card name is eno16777736).

net.ipv6.conf.eno16777736.disable_ipv6 = 1
To reflect the changes by executing the following command.

# sysctl -p

方法 2:
Create file called disableipv6.conf in /etc/sysctl.d.

# vi /etc/sysctl.d/disableipv6.conf
Put the following entry to disable IPv6 for all adapter

net.ipv6.conf.all.disable_ipv6 = 1
For particular adapter. (If the network card name is eno16777736).

net.ipv6.conf.eno16777736.disable_ipv6 = 1
You must reboot the server to take an effect of the changes.

# reboot

Linux

Posted by arkgame