

{"id":1571,"date":"2015-11-15T20:09:03","date_gmt":"2015-11-15T19:09:03","guid":{"rendered":"http:\/\/www.fabionline.net\/aaaaaaa\/?p=1571"},"modified":"2025-03-31T20:44:14","modified_gmt":"2025-03-31T18:44:14","slug":"come-cambiare-i-dns-su-mac-osx-con-un-click","status":"publish","type":"post","link":"https:\/\/www.fabionline.net\/blog\/mac\/come-cambiare-i-dns-su-mac-osx-con-un-click\/","title":{"rendered":"Mac os:How to change dns in a click"},"content":{"rendered":"<p><span style=\"color: #000000;\">I needed to use particular dns and would change them quickly (with a click)<\/span><br>\n<span style=\"color: #000000;\"> here is how i did it:<\/span><br>\n<span style=\"color: #000000;\"> First, here command for make modification by terminal:<\/span><br>\n<span style=\"color: #0000ff;\">sudo networksetup -setdnsservers &lt;networkservice&gt; DNS1, DNS2, DNS3<br>\n<\/span><br>\n<span style=\"color: #000000;\">How to\u00a0obtain a list of your network services:<\/span><br>\n<span style=\"color: #0000ff;\">networksetup -listallnetworkservices<br>\n<\/span><span style=\"color: #0000ff;\"><span style=\"color: #000000;\">you will obtain outcome like below:<br>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1572\" src=\"https:\/\/www.fabionline.net\/blog\/wp-content\/uploads\/networklist.png\" alt=\"networklist\" width=\"431\" height=\"90\" \/><br>\nIn\u00a0my case i have to change Wi-fi dns, so (as example i&#8217;ve used Google dns 8.8.8.8 and 8.8.8.4 ),\u00a0opening \u00a0terminal and running the following command , DNS will be changed:<br>\n<span style=\"color: #0000ff;\">&#8220;sudo networksetup -setdnsservers Wi-Fi 8.8.8.8 8.8.8.4&#8221;<\/span><\/span><\/span><br>\n<span style=\"color: #000000;\">But how to run it with a click ? using Apple script : open it and insert the following commands :<\/span><br>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1575 aligncenter\" src=\"https:\/\/www.fabionline.net\/blog\/wp-content\/uploads\/scriptdns.png\" alt=\"scriptdns\" width=\"637\" height=\"40\" \/><span style=\"color: #000000;\">First row executes the command described above , while second line brings up a message that tells us that the command was executed (clearly\u00a0is optional)<\/span>\u00a0.<br>\n<span style=\"color: #000000;\">After that save as application and work is ended; a click\u00a0will be enough to change your dns<\/span><br>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-1588 aligncenter\" src=\"https:\/\/www.fabionline.net\/blog\/wp-content\/uploads\/application.png\" alt=\"application\" width=\"44\" height=\"58\" \/><span style=\"color: #000000;\">Here is the result after clicking (you will be prompted for the root password )<\/span><br>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-1577\" src=\"https:\/\/www.fabionline.net\/blog\/wp-content\/uploads\/dnsupdate.png\" alt=\"dnsupdate\" width=\"315\" height=\"85\" \/><br>\n<span style=\"color: #000000;\">Looking Dns section we can see that they have been modified<\/span><br>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1576\" src=\"https:\/\/www.fabionline.net\/blog\/wp-content\/uploads\/dnsresults.png\" alt=\"dnsresults\" width=\"113\" height=\"72\" \/><\/p>","protected":false},"excerpt":{"rendered":"<p>I needed to use particular dns and would change them quickly (with a click) here is how i did it: First, here command for make modification by terminal: sudo networksetup -setdnsservers &lt;networkservice&gt; DNS1, DNS2, DNS3 How to\u00a0obtain a list of &hellip; <a href=\"https:\/\/www.fabionline.net\/blog\/mac\/come-cambiare-i-dns-su-mac-osx-con-un-click\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_links_to":"","_links_to_target":""},"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/posts\/1571"}],"collection":[{"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/comments?post=1571"}],"version-history":[{"count":1,"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/posts\/1571\/revisions"}],"predecessor-version":[{"id":2616,"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/posts\/1571\/revisions\/2616"}],"wp:attachment":[{"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/media?parent=1571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/categories?post=1571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fabionline.net\/blog\/wp-json\/wp\/v2\/tags?post=1571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}