By Keith Mitnick on Monday, 27 April 2015
Category: General

How to remove hard coded DNS and Search Domain Servers from the command line

The commands below will remove the settings from the Ethernet and Wi-Fi interfaces.  You can lookup more features using the man command for networksetup.  IE.. man networksetup

networksetup -setsearchdomains "Wi-Fi" "Empty"

networksetup -setdnsservers "Wi-Fi" "Empty"

networksetup -setdnsservers "Ethernet" "Empty"

networksetup -setsearchdomains "Ethernet" "Empty"

Leave Comments