Skip to content

Instantly share code, notes, and snippets.

@wneessen
Created January 24, 2011 14:00
Show Gist options
  • Save wneessen/793241 to your computer and use it in GitHub Desktop.
Save wneessen/793241 to your computer and use it in GitHub Desktop.
Set your MacOS X resolver using scutil for all interfaces
INTERFACES=`echo "list State:/Network/Service/[^/]+/DNS" | scutil | awk -F= '{print $2}'`
SERVER=<yourDNS>
for INTERFACE in ${INTERFACES}
do
echo "get ${INTERFACE}\nd.add ServerAddresses * ${SERVER}\nset ${INTERFACE}" | sudo scutil
done
@qtlin
Copy link

qtlin commented Sep 22, 2016

Do you by any chance know how to resolve https://discussions.apple.com/thread/5483717 using sctuil? A flag Request AAAA records needs to be added to a resolver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment