Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Dnsmasq config file and cache question

    Scheduled Pinned Locked Moved DHCP and DNS
    4 Posts 2 Posters 3.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      srs
      last edited by

      in this topic
      http://forum.pfsense.org/index.php/topic,1003.0.html

      about dns cache, this was said:

      imho,
      a better way using dns cache is telling pfsense that localhost will serve all dns request.
      including request by squid and its own use.

      right now, if you ssh into pfsense and type (say,) ping yahoo.com
      pfsense will use /etc/resolv.conf to resolve the ip address.
      that mean it goes directly to assigned dns server.

      so, imho, /etc/resolve should have this entry instead:
      nameserver 127.0.0.1

      this way, instead of go directly to dns server, it try to resolve through dnsmasq cache.

      then when it's not in cache, dnsmasq should try to go directly to dns server.
      so, we should have entry in dnsmasq.conf something like this:
      resolv-file=/etc/realdnsservers

      and the /etc/realdnsservers file should contain the dns server obtain from dhcp.

      rgds,
      dny.

      as I was unable to reply that topic, I'd like to ask:

      the way I understand, pfsense has a dns cache running in dnsmasq daemon! Let's supose I'd like to do exactally what was said above; I just coudln't find any dnsmasq.conf to place inside it the external dns servers; I've read also that dnsmasq is simple and maybe doesnt have this config file… can I create one? if I do that, how can I inform dnsmasq to read that conf file??

      cannot I simple place into /etc/resolv.conf:
      127.0.0.1
      200.x.x.x
      201.x.x.x

      ??? ???

      in order that pfsense tries first to resolve the name into it's cache and if he can't so it asks for external name servers???

      thanks a lot
      ;)

      1 Reply Last reply Reply Quote 0
      • S
        srs
        last edited by

        someone please???

        1 Reply Last reply Reply Quote 0
        • S
          srs
          last edited by

          up  ;D

          1 Reply Last reply Reply Quote 0
          • GruensFroeschliG
            GruensFroeschli
            last edited by

            why not just try it?

            We do what we must, because we can.

            Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.