본문 바로가기
ChatGPT/프로...Linux

DNS 안 될때

by 크크다스 2025. 8. 25.
반응형

아래 처럼 패키지를 깔려고 하는데 죄다 에러...

nslookup으로 DNS 조회하니까 에러

[/home/firstpw] sudo apt  install docker.io -y
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/libe/liberror-perl/liberror-perl_0.17025-1_all.deb  Could not resolve 'us.archive.ubuntu.com'
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/git/git-man_2.17.1-1ubuntu0.18_all.deb  Could not resolve 'us.archive.ubuntu.com'
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/git/git_2.17.1-1ubuntu0.18_amd64.deb  Could not resolve 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/u/ubuntu-fan/ubuntu-fan_0.12.10_all.deb  Could not resolve 'us.archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
[/home/firstpw] nslookup us.archive.ubuntu.com
^C
[/home/firstpw] 

확인>
[/root] systemctl status systemd-resolved
* systemd-resolved.service - Network Name Resolution
   Loaded: loaded (/lib/systemd/system/systemd-resolved.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2025-08-24 22:42:13 EDT; 2h 50min ago

[/root] systemd-resolve --status  (Ubuntu 18.04)
Global
          DNSSEC NTA: 10.in-addr.arpa
                      16.172.in-addr.arpa
                      168.192.in-addr.arpa
                      17.172.in-addr.arpa

[/etc] resolvectl status (Ubuntu 20.04 ~)
Global
       LLMNR setting: no
MulticastDNS setting: no
  DNSOverTLS setting: no

[/home/firstpw/APC/SRC/kt_wims3] resolvectl status
Global
         Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
  resolv.conf mode: foreign
Current DNS Server: 10.255.255.254   <==== 이런게 있어야 함
       DNS Servers: 10.255.255.254
        DNS Domain: lan

 

이럴 경우에는 netplan에 Static DNS Server 적용(영구적)

 

network:
  ethernets:
    eth0:
      dhcp4: true
      nameservers:
        addresses:
          - 8.8.8.8
          - 1.1.1.1
반응형