Skip to content

Instantly share code, notes, and snippets.

@benesch
Created December 24, 2014 21:29
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 benesch/76393d012a52c0f8eac4 to your computer and use it in GitHub Desktop.
Save benesch/76393d012a52c0f8eac4 to your computer and use it in GitHub Desktop.
OS X VPN Diagnostics
#!/usr/bin/env bash
scutil --nc list
IFS=$'\n' interfaces=($(scutil --nc list | tail -n+2 | sed -E 's/.*"([^"]+)".*/\1/'))
for interface in "${interfaces[@]}"
do
scutil --nc show "$interface"
echo "Search domains"
networksetup -getsearchdomains "128.103.9.252"
echo "DNS servers"
networksetup -getdnsservers "128.103.9.252"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment