启用ipv6模块

# 首先申请root权限
# Edit /etc/default/grub and change the value of kernel parameter ipv6.disable from 1 to 0 in line GRUB_CMDLINE_LINUX, e.g.:
$ cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="ipv6.disable=0 crashkernel=auto rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
$ sed -i 's/ipv6.disable=1/ipv6.disable=0/g' /etc/default/grub

# Note: ipv6.disable=0 is the default value, so you can simply remove this argument ipv6.disable from GRUB_CMDLINE_LINUX argument list if you want.
# Regenerate a GRUB configuration file and overwrite existing one using the command shown below.
$ grub2-mkconfig -o /boot/grub2/grub.cfg

# Restart system for the changes to take effect.
$ systemctl enable sshd
$ reboot

你可能感兴趣的:(启用ipv6模块)