Disable IPv6 in kernel module (requires reboot) CentOS7

Check IP V6 Interface

[root@fs teee]# ip addr show | grep net6
inet6 ::1/128 scope host
inet6 fe80::1097:73ff:fe6e:9d73/64 scope link
inet6 fe80::504d:83ff:fe2b:962/64 scope link

[root@fs teee]# ee /etc/default/grub
GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR=”$(sed ‘s, release .*$,,g’ /etc/system-release)”
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL=”serial console”
GRUB_CMDLINE_LINUX=”ipv6.disable=1 crashkernel=auto rhgb quiet”
GRUB_SERIAL_COMMAND=”serial”
GRUB_CMDLINE_LINUX=”console=tty0 crashkernel=auto net.ifnames=0 console=ttyS0″
GRUB_DISABLE_RECOVERY=”true”

Rebuilt GRUB

[root@fs teee]# grub2-mkconfig -o /boot/grub2/grub.cfg

[root@fs teee]# ee /etc/sysctl.conf

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

<SAVE>
[root@fs teee]# sysctl -p
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

SSH

[root@fs teee]# ee /etc/ssh/sshd_config
Port xxxx
AddressFamily inet

Comments are closed.