문서의 이전 판입니다!


우분투 DNS 바꾸기

확인

root@Ubuntu12:~# nslookup server 
Server:		8.8.4.4
Address:	8.8.4.4#53

** server can't find server: NXDOMAIN
</source>
<source lang='console'>
root@Ubuntu12:~# cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.4.4

변경

먼저 네트워크 장비의 이름 확인

$ cat /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp0s25
iface enp0s25 inet static
    address 192.168.0.6
    netmask 255.255.255.0
    gateway 192.168.0.1
    dns-nameservers 168.126.63.1 168.126.63.2 8.8.8.8 8.8.4.4
    up ethtoo -s enp0s25 wol g

장비 이름이 enp0s25 이므로

 echo "nameserver 8.8.8.8" | sudo resolvconf -a enp0s25.inet

재확인

$ sudo nslookup server
Server:		8.8.8.8
Address:	8.8.8.8#53

** server can't find server: NXDOMAIN
$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8

연결문서


CC Attribution-Noncommercial-Share Alike 4.0 International 별도로 명시하지 않을 경우, 이 페이지의 내용은 다음 라이선스에 따라 사용할 수 있습니다: CC Attribution-Noncommercial-Share Alike 4.0 International
tech/우분투_dns_바꾸기.1503616329.txt.gz · 마지막으로 수정됨 저자 121.134.164.159