disable IPv6
This commit is contained in:
parent
5af27071db
commit
7b29069384
|
|
@ -8,6 +8,17 @@ config_domain=$(hostname --domain)
|
|||
echo "127.0.0.1 $config_fqdn" >>/etc/hosts
|
||||
|
||||
|
||||
# disable IPv6.
|
||||
cat >/etc/sysctl.d/98-disable-ipv6.conf <<'EOF'
|
||||
net.ipv6.conf.all.disable_ipv6 = 1
|
||||
net.ipv6.conf.default.disable_ipv6 = 1
|
||||
net.ipv6.conf.lo.disable_ipv6 = 1
|
||||
EOF
|
||||
systemctl restart procps
|
||||
sed -i -E 's,(GRUB_CMDLINE_LINUX=.+)",\1 ipv6.disable=1",' /etc/default/grub
|
||||
update-grub2
|
||||
|
||||
|
||||
# update the package cache.
|
||||
apt-get -y update
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue