Check Network Interface

Use the following command to see which network interface you are using

networksetup -listallnetworkservices

Set DNS Server Config

sudo networksetup -setdnsservers Wi-Fi empty
sudo networksetup -setdnsservers Wi-Fi 223.5.5.5 223.6.6.6
sudo killall -HUP mDNSResponder

Reference

  • https://superuser.com/questions/86184/change-dns-server-from-terminal-or-script-on-mac-os-x