June 5th, 2014

How to disable ipv6 on Mavericks.

The problem: There is no option to turn "Off" ipv6 in Mavericks by default.

On MacOSX Mavericks:

sudo networksetup -listallnetworkservices |grep -v asterisk | while read a; do sudo networksetup -setv6off "$a" ;done


Before doing this there is no option to turn "Off". After doing this you'll see you have the "Off" option listed and it's now "Off."

ipv6-2


Confirm that it's off:

$  sudo networksetup -listallnetworkservices |grep -v asterisk | while read a; do echo -n "$a: " ; sudo networksetup -getinfo "$a" |grep IPv6 ;done
Thunderbolt Ethernet: IPv6: Off
Wi-Fi: IPv6: Off
VPN (L2TP): IPv6: Off
VPN (L2TP) -old: IPv6: Off
Bluetooth DUN: IPv6: Off
Thunderbolt Bridge: IPv6: Off