Last active
June 3, 2016 12:52
-
-
Save ervinb/511cd93e7292b874a211ffe06fd24d2e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sudo bash -c 'echo -e "net.ipv6.conf.all.disable_ipv6 = 1\nnet.ipv6.conf.default.disable_ipv6 = 1\nnet.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf' | |
sudo sysctl -p &>/dev/null | |
disabled=$(cat /proc/sys/net/ipv6/conf/all/disable_ipv6) | |
[ $disabled == 1 ] && echo "IPv6 disabled" || echo "IPv6 is enabled" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment