hzqim
V2EX  ›  问与答

Dnsmasq 和 resolv.conf 是什么关系?

  •  
  •   hzqim · Jan 26, 2015 · 6012 views
    This topic created in 4212 days ago, the information mentioned may be changed or developed.
    dnsmasq 监听了 53 端口,应该就是系统的默认 DNS server,resolv.conf 是否只用于指定系统的上游 DNS server?
    如果我在 dnsmasq.conf 里指定了server=127.0.0.1#5353 (chinadns),那么是否可以无视 resolv.conf 的设定了?

    一句话就是dnsmasq和resolv.conf的优先级或依附关系是怎样的?

    谢谢指点。
    4 replies    2015-01-26 11:10:34 +08:00
    chon
        1
    chon  
       Jan 26, 2015 via Android   ❤️ 1
    Dnsmasq可以提供DNS服务,而resolv.conf是Linux中DNS的配置文件,二者没有关系。
    letitbesqzr
        2
    letitbesqzr  
       Jan 26, 2015   ❤️ 1
    应该来说是指dnsmasq如果没有指定上游dns server 就会默认去使用resolv.conf里指定的
    Oishi
        3
    Oishi  
       Jan 26, 2015   ❤️ 1
    dnsmasq配置文件中由选项可以控制是否使用resolv.conf

    # If you don't want dnsmasq to read /etc/resolv.conf or any other
    # file, getting its servers from this file instead (see below), then
    # uncomment this.
    #no-resolv
    princelai
        4
    princelai  
       Jan 26, 2015   ❤️ 1
    一般情况下resolv.conf = resolv.conf.auto,不解析就是no-resolv,应该只是一个官方Dns
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2893 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 07:28 · PVG 15:28 · LAX 00:28 · JFK 03:28
    ♥ Do have faith in what you're doing.