Skip to content

Instantly share code, notes, and snippets.

@tsleite
Created January 4, 2021 15:06
Show Gist options
  • Save tsleite/56015d9cf0367b555f2ccf85e543a31b to your computer and use it in GitHub Desktop.
Save tsleite/56015d9cf0367b555f2ccf85e543a31b to your computer and use it in GitHub Desktop.
#!/bin/bash
# Disable IPv6 on Linux
echo "Disabling IPv6..."
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo "Disabling IPv6 on boot..."
cat >> /etc/sysctl.conf << EOF
#disable ipv6 on boot
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment