This will first disable IPv6 for Wi-Fi then go through all Ethernet hardware and disable the IPv6
networksetup -setv6off Wi-Fi networksetup -listallnetworkservices | sed "1 d" | grep "Ethernet" | while read output ;do networksetup -setv6off "$output";done
Similar to before this will first enable IPv6 for Wi-Fi then go through all Ethernet hardware and enable the IPv6
networksetup -setv6automatic Wi-Fi networksetup -listallnetworkservices | sed "1 d" | grep "Ethernet" | while read output ;do networksetup -setv6automatic "$output";done
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.