disable IPv6

This commit is contained in:
Rui Lopes 2017-06-02 21:10:33 +01:00
parent 5af27071db
commit 7b29069384
1 changed files with 11 additions and 0 deletions

View File

@ -8,6 +8,17 @@ config_domain=$(hostname --domain)
echo "127.0.0.1 $config_fqdn" >>/etc/hosts 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. # update the package cache.
apt-get -y update apt-get -y update