How to fix DNS Resolve ใน Proxmox container

Viewed 1

Container (LXC)

ให้เพิ่ม IP ของ caddy เข้าไปใน file /etc/hosts
ตัวอย่าง
10.4.8.4 learn.thaimooc.progress.plus *.learn.thaimooc.progress.plus

ถ้าใน Container มี docker

(10.4.7.13 คือ IP ของ container LXC)

  1. ให้เพิ่ม "dns": ["10.4.7.13", "8.8.8.8"] ใน /etc/docker/daemon.json
  2. ติดตั้ง dnsmasq ที่ host (container lxc)
  3. แก้ไข /etc/dnsmasq.config
    listen-address=127.0.0.1,10.4.7.13
  4. Restart docker
  5. Exec เข้าไปใน docker container with user root + (apt update && apt install dnsutils -y)
  6. Test: nslookup studio.learn.thaimooc.progress.plus 10.4.7.13
0 Answers
Related