6/26/2020

Ubuntu : Ubuntu resolv.conf nameserver เปลี่ยน

Ubuntu : Ubuntu resolv.conf nameserver เปลี่ยน ทำให้ออกเน็ตไม่ได้
ค่าเดิม
nameserver 127.0.0.53

วิธีแก้
# Use Google's public DNS servers.
nameserver 8.8.4.4
nameserver 8.8.8.8


But things change and now it’s not that simple. If you now edit /etc/resolv.conf on Ubuntu you’ll find that the edits are ephemeral. If you restart (or even hibernate) your machine then they’ll be overwritten by default content.

nameserver 127.0.0.53
search Home


This is pretty simple to fix though.
1.Install the resolvconf package.
  1. sudo apt install resolvconf


2. Edit /etc/resolvconf/resolv.conf.d/head and add the following:
  1. # Make edits to /etc/resolvconf/resolv.conf.d/head.
  2. nameserver 8.8.4.4
  3. nameserver 8.8.8.8


3. Restart the resolvconf service.
  1. /etc/init.d/resolvconf restart

Fix should be permanent.
https://datawookie.netlify.app/blog/2018/10/dns-on-ubuntu-18.04/

No comments:

Post a Comment