Skip to content

Instantly share code, notes, and snippets.

@dknecht
Last active April 1, 2018 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dknecht/4582d16021f032c336610948c6ad5f6f to your computer and use it in GitHub Desktop.
Save dknecht/4582d16021f032c336610948c6ad5f6f to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
while read iface; do
networksetup -setdnsservers "${iface}" 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001
done < <(networksetup -listallnetworkservices | grep -v '*')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment