{"id":475,"date":"2017-01-21T23:58:56","date_gmt":"2017-01-21T16:58:56","guid":{"rendered":"http:\/\/www.otakudang.org\/?p=475"},"modified":"2017-01-26T18:04:17","modified_gmt":"2017-01-26T11:04:17","slug":"tips-ubuntu-tidak-bisa-ping-tapi-bisa-nslookup","status":"publish","type":"post","link":"https:\/\/www.otakudang.org\/?p=475","title":{"rendered":"[tips] Ubuntu Tidak Bisa Ping Tapi Bisa Nslookup"},"content":{"rendered":"<p>Pernah mengalami host Ubuntu tidak bisa ping ke mana pun, padahal\u00a0kita bisa browse ke mana pun?<\/p>\n<p>Jadi ketika saya coba ping (di\u00a0<strong>\/etc\/resolv.conf<\/strong> sudah saya isikan nameserver 8.8.8.8 dan 8.8.4.4) hasilnya:<\/p>\n<pre># ping detik.com\r\n ping: detik.com: Name or service not known<\/pre>\n<p>Tapi ketika menjalankan\u00a0<em>nslookup<\/em>:<\/p>\n<pre># nslookup\r\n > detik.com\r\n ;; Got recursion not available from 8.8.8.8, trying next server\r\n Server: 8.8.4.4\r\n Address: 8.8.4.4#53\r\n\r\nNon-authoritative answer:\r\n Name: detik.com\r\n Address: 203.190.242.211\r\n Name: detik.com\r\n Address: 103.49.221.211<\/pre>\n<p>Hal ini sangat mengganggu kegiatan di shell prompt. Tapi setelah ke sana ke mari, akhirnya ketemu permasalahannya. Jika kita check file\u00a0<strong>\/etc\/nsswitch.conf<\/strong>, kemungkinan kita akan mendapati baris:<\/p>\n<pre>hosts: \u00a0 \u00a0 \u00a0 \u00a0 \u00a0files mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns<\/pre>\n<p>Jika iya, edit baris tersebut menjadi:<\/p>\n<pre>hosts: \u00a0 \u00a0 \u00a0 \u00a0 \u00a0files dns<\/pre>\n<p>Lalu untuk memastikan tidak terjadi lagi hal seperti di atas, kita bisa menghapus\u00a0<em><strong>libnss-mdns<\/strong>:<\/em><\/p>\n<pre># apt-get remove libnss-mdns --purge\r\n Reading package lists... Done\r\n Building dependency tree\r\n Reading state information... Done\r\n The following packages will be REMOVED:\r\n libnss-mdns*\r\n 0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.\r\n After this operation, 110 kB disk space will be freed.\r\n Do you want to continue? [Y\/n]<\/pre>\n<p>Nah sekarang ping ke mana pun sudah tidak ada masalah:<\/p>\n<pre># ping detik.com -c3\r\n PING detik.com (103.49.221.211) 56(84) bytes of data.\r\n 64 bytes from 103.49.221.211 (103.49.221.211): icmp_seq=1 ttl=57 time=27.6 ms\r\n 64 bytes from 103.49.221.211 (103.49.221.211): icmp_seq=2 ttl=57 time=27.1 ms\r\n 64 bytes from 103.49.221.211 (103.49.221.211): icmp_seq=3 ttl=57 time=29.1 ms<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Pernah mengalami host Ubuntu tidak bisa ping ke mana pun, padahal\u00a0kita bisa browse ke mana pun? Jadi ketika saya coba ping (di\u00a0\/etc\/resolv.conf sudah saya isikan nameserver 8.8.8.8 dan 8.8.4.4) hasilnya: # ping detik.com ping: detik.com: Name or service not known Tapi ketika menjalankan\u00a0nslookup: # nslookup > detik.com ;; Got recursion not available from 8.8.8.8, trying &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.otakudang.org\/?p=475\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;[tips] Ubuntu Tidak Bisa Ping Tapi Bisa Nslookup&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-475","post","type-post","status-publish","format-standard","hentry","category-mntubuntu","entry"],"_links":{"self":[{"href":"https:\/\/www.otakudang.org\/index.php?rest_route=\/wp\/v2\/posts\/475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.otakudang.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.otakudang.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.otakudang.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.otakudang.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=475"}],"version-history":[{"count":6,"href":"https:\/\/www.otakudang.org\/index.php?rest_route=\/wp\/v2\/posts\/475\/revisions"}],"predecessor-version":[{"id":502,"href":"https:\/\/www.otakudang.org\/index.php?rest_route=\/wp\/v2\/posts\/475\/revisions\/502"}],"wp:attachment":[{"href":"https:\/\/www.otakudang.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.otakudang.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.otakudang.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}