Skip to content

Instantly share code, notes, and snippets.

@karthikeyan-mac
Created June 15, 2023 15:32
Show Gist options
  • Save karthikeyan-mac/89864d4886ec27f0e723627316b98a84 to your computer and use it in GitHub Desktop.
Save karthikeyan-mac/89864d4886ec27f0e723627316b98a84 to your computer and use it in GitHub Desktop.
Disable IPv6 in all ports
#!/bin/sh
IFS=$'\n'
allPorts=`networksetup -listallnetworkservices | grep -v asterisk`
for port in $allPorts
do
networksetup -setv6off "$port"
echo "$port" IPv6 is Off
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment