How does pdnsd decide between using /etc/hosts file and using the servers it's configured to use?












0














We're using pdnsd at a remote station. It is configured to query the DNS servers at our main site.
The issue is when the connection at the remote site goes down the computers at the remote site all of a sudden cannot reach internal resources.
The host running pdnsd has local server names in its /etc/hosts file. Pdnsd's configuration default in the sources section is the "/etc/hosts" file.



I confirmed that the TTL being delivered to the pdnsd from the root servers is 1 hour.
I've also confirmed the TTL in the /etc/hosts file is 1 day.
However, when the connection goes down those computers cannot reach their internal servers.
So how does pdnsd decide if it's going to use the "root servers" or the "/etc/hosts" file to reslove names to IP addresses?



Thank you,
pender



This the configuration: I took out the IP's of our servers.



// Read the pdnsd.conf(5) manpage for an explanation of the options.



/* Note: this file is overriden by automatic config files when
/etc/default/pdnsd AUTO_MODE is set and that
/usr/share/pdnsd/pdnsd-$AUTO_MODE.conf exists
*/



global {
perm_cache=2048;
cache_dir="/var/cache/pdnsd";
run_as="pdnsd";
server_ip = eth0; // Use eth0 here if you want to allow other
// machines on your network to query pdnsd.
status_ctl = on;
paranoid=on;
// query_method=tcp_udp; // pdnsd must be compiled with tcp
// query support for this to work.
min_ttl=15m; // Retain cached entries at least 15 minutes.
max_ttl=1w; // One week.
timeout=10; // Global timeout option (10 seconds).



    // Don't enable if you don't recurse yourself, can lead to problems
// delegation_only="com","net";


}



/* with status_ctl=on and resolvconf installed, this will work out from the box
this is the recommended setup for mobile machines */
server {
label="resolvconf";
}



// This section is meant for resolving from root servers.
server {
label = "root-servers";
root_server=on;
ip = x.x.x.x
, x.x.x.x
, x.x.x.x
;
timeout = 5;
uptest = query;
interval = 30m; // Test every half hour.
ping_timeout = 300; // 30 seconds.
purge_cache = off;
exclude = .localdomain;
policy = included;
preset = off;
}



source {
owner=localhost;
// serve_aliases=on;
file="/etc/hosts";
}



rr {
name=localhost;
reverse=on;
a=127.0.0.1;
owner=localhost;
soa=localhost,root.localhost,42,86400,900,86400,86400;
}



/*
neg {
name=doubleclick.net;
types=domain; // This will also block xxx.doubleclick.net, etc.
}
*/



/*
neg {
name=bad.server.com; // Badly behaved server you don't want to connect to.
types=A,AAAA;
}
*/



/* vim:set ft=c: */










share|improve this question



























    0














    We're using pdnsd at a remote station. It is configured to query the DNS servers at our main site.
    The issue is when the connection at the remote site goes down the computers at the remote site all of a sudden cannot reach internal resources.
    The host running pdnsd has local server names in its /etc/hosts file. Pdnsd's configuration default in the sources section is the "/etc/hosts" file.



    I confirmed that the TTL being delivered to the pdnsd from the root servers is 1 hour.
    I've also confirmed the TTL in the /etc/hosts file is 1 day.
    However, when the connection goes down those computers cannot reach their internal servers.
    So how does pdnsd decide if it's going to use the "root servers" or the "/etc/hosts" file to reslove names to IP addresses?



    Thank you,
    pender



    This the configuration: I took out the IP's of our servers.



    // Read the pdnsd.conf(5) manpage for an explanation of the options.



    /* Note: this file is overriden by automatic config files when
    /etc/default/pdnsd AUTO_MODE is set and that
    /usr/share/pdnsd/pdnsd-$AUTO_MODE.conf exists
    */



    global {
    perm_cache=2048;
    cache_dir="/var/cache/pdnsd";
    run_as="pdnsd";
    server_ip = eth0; // Use eth0 here if you want to allow other
    // machines on your network to query pdnsd.
    status_ctl = on;
    paranoid=on;
    // query_method=tcp_udp; // pdnsd must be compiled with tcp
    // query support for this to work.
    min_ttl=15m; // Retain cached entries at least 15 minutes.
    max_ttl=1w; // One week.
    timeout=10; // Global timeout option (10 seconds).



        // Don't enable if you don't recurse yourself, can lead to problems
    // delegation_only="com","net";


    }



    /* with status_ctl=on and resolvconf installed, this will work out from the box
    this is the recommended setup for mobile machines */
    server {
    label="resolvconf";
    }



    // This section is meant for resolving from root servers.
    server {
    label = "root-servers";
    root_server=on;
    ip = x.x.x.x
    , x.x.x.x
    , x.x.x.x
    ;
    timeout = 5;
    uptest = query;
    interval = 30m; // Test every half hour.
    ping_timeout = 300; // 30 seconds.
    purge_cache = off;
    exclude = .localdomain;
    policy = included;
    preset = off;
    }



    source {
    owner=localhost;
    // serve_aliases=on;
    file="/etc/hosts";
    }



    rr {
    name=localhost;
    reverse=on;
    a=127.0.0.1;
    owner=localhost;
    soa=localhost,root.localhost,42,86400,900,86400,86400;
    }



    /*
    neg {
    name=doubleclick.net;
    types=domain; // This will also block xxx.doubleclick.net, etc.
    }
    */



    /*
    neg {
    name=bad.server.com; // Badly behaved server you don't want to connect to.
    types=A,AAAA;
    }
    */



    /* vim:set ft=c: */










    share|improve this question

























      0












      0








      0







      We're using pdnsd at a remote station. It is configured to query the DNS servers at our main site.
      The issue is when the connection at the remote site goes down the computers at the remote site all of a sudden cannot reach internal resources.
      The host running pdnsd has local server names in its /etc/hosts file. Pdnsd's configuration default in the sources section is the "/etc/hosts" file.



      I confirmed that the TTL being delivered to the pdnsd from the root servers is 1 hour.
      I've also confirmed the TTL in the /etc/hosts file is 1 day.
      However, when the connection goes down those computers cannot reach their internal servers.
      So how does pdnsd decide if it's going to use the "root servers" or the "/etc/hosts" file to reslove names to IP addresses?



      Thank you,
      pender



      This the configuration: I took out the IP's of our servers.



      // Read the pdnsd.conf(5) manpage for an explanation of the options.



      /* Note: this file is overriden by automatic config files when
      /etc/default/pdnsd AUTO_MODE is set and that
      /usr/share/pdnsd/pdnsd-$AUTO_MODE.conf exists
      */



      global {
      perm_cache=2048;
      cache_dir="/var/cache/pdnsd";
      run_as="pdnsd";
      server_ip = eth0; // Use eth0 here if you want to allow other
      // machines on your network to query pdnsd.
      status_ctl = on;
      paranoid=on;
      // query_method=tcp_udp; // pdnsd must be compiled with tcp
      // query support for this to work.
      min_ttl=15m; // Retain cached entries at least 15 minutes.
      max_ttl=1w; // One week.
      timeout=10; // Global timeout option (10 seconds).



          // Don't enable if you don't recurse yourself, can lead to problems
      // delegation_only="com","net";


      }



      /* with status_ctl=on and resolvconf installed, this will work out from the box
      this is the recommended setup for mobile machines */
      server {
      label="resolvconf";
      }



      // This section is meant for resolving from root servers.
      server {
      label = "root-servers";
      root_server=on;
      ip = x.x.x.x
      , x.x.x.x
      , x.x.x.x
      ;
      timeout = 5;
      uptest = query;
      interval = 30m; // Test every half hour.
      ping_timeout = 300; // 30 seconds.
      purge_cache = off;
      exclude = .localdomain;
      policy = included;
      preset = off;
      }



      source {
      owner=localhost;
      // serve_aliases=on;
      file="/etc/hosts";
      }



      rr {
      name=localhost;
      reverse=on;
      a=127.0.0.1;
      owner=localhost;
      soa=localhost,root.localhost,42,86400,900,86400,86400;
      }



      /*
      neg {
      name=doubleclick.net;
      types=domain; // This will also block xxx.doubleclick.net, etc.
      }
      */



      /*
      neg {
      name=bad.server.com; // Badly behaved server you don't want to connect to.
      types=A,AAAA;
      }
      */



      /* vim:set ft=c: */










      share|improve this question













      We're using pdnsd at a remote station. It is configured to query the DNS servers at our main site.
      The issue is when the connection at the remote site goes down the computers at the remote site all of a sudden cannot reach internal resources.
      The host running pdnsd has local server names in its /etc/hosts file. Pdnsd's configuration default in the sources section is the "/etc/hosts" file.



      I confirmed that the TTL being delivered to the pdnsd from the root servers is 1 hour.
      I've also confirmed the TTL in the /etc/hosts file is 1 day.
      However, when the connection goes down those computers cannot reach their internal servers.
      So how does pdnsd decide if it's going to use the "root servers" or the "/etc/hosts" file to reslove names to IP addresses?



      Thank you,
      pender



      This the configuration: I took out the IP's of our servers.



      // Read the pdnsd.conf(5) manpage for an explanation of the options.



      /* Note: this file is overriden by automatic config files when
      /etc/default/pdnsd AUTO_MODE is set and that
      /usr/share/pdnsd/pdnsd-$AUTO_MODE.conf exists
      */



      global {
      perm_cache=2048;
      cache_dir="/var/cache/pdnsd";
      run_as="pdnsd";
      server_ip = eth0; // Use eth0 here if you want to allow other
      // machines on your network to query pdnsd.
      status_ctl = on;
      paranoid=on;
      // query_method=tcp_udp; // pdnsd must be compiled with tcp
      // query support for this to work.
      min_ttl=15m; // Retain cached entries at least 15 minutes.
      max_ttl=1w; // One week.
      timeout=10; // Global timeout option (10 seconds).



          // Don't enable if you don't recurse yourself, can lead to problems
      // delegation_only="com","net";


      }



      /* with status_ctl=on and resolvconf installed, this will work out from the box
      this is the recommended setup for mobile machines */
      server {
      label="resolvconf";
      }



      // This section is meant for resolving from root servers.
      server {
      label = "root-servers";
      root_server=on;
      ip = x.x.x.x
      , x.x.x.x
      , x.x.x.x
      ;
      timeout = 5;
      uptest = query;
      interval = 30m; // Test every half hour.
      ping_timeout = 300; // 30 seconds.
      purge_cache = off;
      exclude = .localdomain;
      policy = included;
      preset = off;
      }



      source {
      owner=localhost;
      // serve_aliases=on;
      file="/etc/hosts";
      }



      rr {
      name=localhost;
      reverse=on;
      a=127.0.0.1;
      owner=localhost;
      soa=localhost,root.localhost,42,86400,900,86400,86400;
      }



      /*
      neg {
      name=doubleclick.net;
      types=domain; // This will also block xxx.doubleclick.net, etc.
      }
      */



      /*
      neg {
      name=bad.server.com; // Badly behaved server you don't want to connect to.
      types=A,AAAA;
      }
      */



      /* vim:set ft=c: */







      dns






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 7 at 18:17









      pender

      12




      12



























          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1099242%2fhow-does-pdnsd-decide-between-using-etc-hosts-file-and-using-the-servers-its-c%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1099242%2fhow-does-pdnsd-decide-between-using-etc-hosts-file-and-using-the-servers-its-c%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Ellipse (mathématiques)

          Quarter-circle Tiles

          Mont Emei