{"id":2115,"date":"2017-12-07T23:05:01","date_gmt":"2017-12-07T15:05:01","guid":{"rendered":"https:\/\/www.ookangzheng.com\/?p=2115"},"modified":"2020-05-24T15:59:38","modified_gmt":"2020-05-24T07:59:38","slug":"custom-dns-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.ookangzheng.com\/custom-dns-on-ubuntu\/","title":{"rendered":"Custom DNS on Ubuntu"},"content":{"rendered":"

Updated 2019-02-27<\/p>\n

Server: Ubuntu 18.04<\/p>\n

Provider: Vultr<\/p>\n

First of all, there are many tricks.. to set custom DNS on the latest Ubuntu<\/p>\n

Let’s get our hand dirty\u00a0<\/p>\n\n\n

1. Edit resolved config file\nnano \/etc\/systemd\/resolved.conf\n\n2. Replace #DNS into DNS\nDNS=9.9.9.9 1.1.1.1\n\n3. Restart systemd service \nservice systemd-resolved restart\n\n4. Finally, check the status \nsystemd-resolve --status\n\n\/\/ Method 2\n\nnano \/etc\/resolvconf\/resolv.conf.d\/head\n\n\/\/ Put nameserver inside\nnameserver 9.9.9.9\nnameserver 1.1.1.1\n\nOR \n\nnano \/etc\/resolv.conf\nnameserver 9.9.9.9\nnameserver 1.1.1.1<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"

Updated 2019-02-27 Server: Ubuntu 18.04 Provider: Vultr First of all, there are many tricks.. to set custom DNS on the…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37,32],"tags":[81,74],"class_list":["post-2115","post","type-post","status-publish","format-standard","hentry","category-linux","category-technology","tag-dns","tag-linux"],"_links":{"self":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/posts\/2115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/comments?post=2115"}],"version-history":[{"count":0,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/posts\/2115\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/media?parent=2115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/categories?post=2115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/tags?post=2115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}