Skip to content

Instantly share code, notes, and snippets.

@gjpalau
Created July 20, 2015 21:08
Show Gist options
  • Save gjpalau/f398c78c586e63d4c258 to your computer and use it in GitHub Desktop.
Save gjpalau/f398c78c586e63d4c258 to your computer and use it in GitHub Desktop.
turn off IPv6 on OS X via Script
#!/bin/sh
\#
\# ipv6-off.sh
\# Disable IPv6 on all interfaces.
\#
IFS=$'\n'
net=`networksetup -listallnetworkservices | grep -v asterisk`
for i in $net
do
networksetup -setv6off "$i"
echo "$i" IPv6 is Off
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment