How to query the resolvconf database?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












The Description of resolveconf in it's manual page tells us: "The resolvconf package comprises a simple database for run-time nameserver information ...".



What is clear in the manual page is how to add or remove information to that database.



But, How to query it?.







share|improve this question
























    up vote
    3
    down vote

    favorite












    The Description of resolveconf in it's manual page tells us: "The resolvconf package comprises a simple database for run-time nameserver information ...".



    What is clear in the manual page is how to add or remove information to that database.



    But, How to query it?.







    share|improve this question






















      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      The Description of resolveconf in it's manual page tells us: "The resolvconf package comprises a simple database for run-time nameserver information ...".



      What is clear in the manual page is how to add or remove information to that database.



      But, How to query it?.







      share|improve this question












      The Description of resolveconf in it's manual page tells us: "The resolvconf package comprises a simple database for run-time nameserver information ...".



      What is clear in the manual page is how to add or remove information to that database.



      But, How to query it?.









      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 23 '17 at 15:22









      jgomo3

      1164




      1164




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote













          ls /etc/resolvconf/run/interface


          will list all the pieces of nameserver information that have been added to resolvconf database. Their names will usually identify the interface to which they're associated, and possibly other things.



          These are all text files, effectively fragments of /etc/resolv.conf. So you can view them with any text viewer utility.



          For example, on my home gateway system (Debian 9):



          # ls /etc/resolvconf/run/interface/
          eth2.dhclient eth2.ip6.dhclient lo.inet lo.named


          eth2 is my external interface that gets its configuration via DHCP. The default domain and IPv4 DNS servers provided by my ISP's DHCP server are in file eth2.dhclient. The file eth2.ip6.dhclient has the same information for IPv6. lo.inet contains the domain search line I've set locally, and it overrides the default domain set by the ISP. And since I run a local BIND for my private home DNS domain, once BIND has started up, Debian's systemd configuration for it will optionally add a nameserver 127.0.0.1 line as lo.named.



          Since /etc/resolvconf/interface-order file says that lo takes priority over anything else, the search line from lo.inet will always go to the real /etc/resolv.conf. If my BIND is running, it will be used as a local nameserver; but if it fails for some reason and systemd is unable to restart it, the dependencies in systemd configuration will cause the lo.named to be removed, and then nameserver 127.0.0.1 in /etc/resolv.conf will be automatically replaced by ISP's nameservers.






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f412686%2fhow-to-query-the-resolvconf-database%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            2
            down vote













            ls /etc/resolvconf/run/interface


            will list all the pieces of nameserver information that have been added to resolvconf database. Their names will usually identify the interface to which they're associated, and possibly other things.



            These are all text files, effectively fragments of /etc/resolv.conf. So you can view them with any text viewer utility.



            For example, on my home gateway system (Debian 9):



            # ls /etc/resolvconf/run/interface/
            eth2.dhclient eth2.ip6.dhclient lo.inet lo.named


            eth2 is my external interface that gets its configuration via DHCP. The default domain and IPv4 DNS servers provided by my ISP's DHCP server are in file eth2.dhclient. The file eth2.ip6.dhclient has the same information for IPv6. lo.inet contains the domain search line I've set locally, and it overrides the default domain set by the ISP. And since I run a local BIND for my private home DNS domain, once BIND has started up, Debian's systemd configuration for it will optionally add a nameserver 127.0.0.1 line as lo.named.



            Since /etc/resolvconf/interface-order file says that lo takes priority over anything else, the search line from lo.inet will always go to the real /etc/resolv.conf. If my BIND is running, it will be used as a local nameserver; but if it fails for some reason and systemd is unable to restart it, the dependencies in systemd configuration will cause the lo.named to be removed, and then nameserver 127.0.0.1 in /etc/resolv.conf will be automatically replaced by ISP's nameservers.






            share|improve this answer
























              up vote
              2
              down vote













              ls /etc/resolvconf/run/interface


              will list all the pieces of nameserver information that have been added to resolvconf database. Their names will usually identify the interface to which they're associated, and possibly other things.



              These are all text files, effectively fragments of /etc/resolv.conf. So you can view them with any text viewer utility.



              For example, on my home gateway system (Debian 9):



              # ls /etc/resolvconf/run/interface/
              eth2.dhclient eth2.ip6.dhclient lo.inet lo.named


              eth2 is my external interface that gets its configuration via DHCP. The default domain and IPv4 DNS servers provided by my ISP's DHCP server are in file eth2.dhclient. The file eth2.ip6.dhclient has the same information for IPv6. lo.inet contains the domain search line I've set locally, and it overrides the default domain set by the ISP. And since I run a local BIND for my private home DNS domain, once BIND has started up, Debian's systemd configuration for it will optionally add a nameserver 127.0.0.1 line as lo.named.



              Since /etc/resolvconf/interface-order file says that lo takes priority over anything else, the search line from lo.inet will always go to the real /etc/resolv.conf. If my BIND is running, it will be used as a local nameserver; but if it fails for some reason and systemd is unable to restart it, the dependencies in systemd configuration will cause the lo.named to be removed, and then nameserver 127.0.0.1 in /etc/resolv.conf will be automatically replaced by ISP's nameservers.






              share|improve this answer






















                up vote
                2
                down vote










                up vote
                2
                down vote









                ls /etc/resolvconf/run/interface


                will list all the pieces of nameserver information that have been added to resolvconf database. Their names will usually identify the interface to which they're associated, and possibly other things.



                These are all text files, effectively fragments of /etc/resolv.conf. So you can view them with any text viewer utility.



                For example, on my home gateway system (Debian 9):



                # ls /etc/resolvconf/run/interface/
                eth2.dhclient eth2.ip6.dhclient lo.inet lo.named


                eth2 is my external interface that gets its configuration via DHCP. The default domain and IPv4 DNS servers provided by my ISP's DHCP server are in file eth2.dhclient. The file eth2.ip6.dhclient has the same information for IPv6. lo.inet contains the domain search line I've set locally, and it overrides the default domain set by the ISP. And since I run a local BIND for my private home DNS domain, once BIND has started up, Debian's systemd configuration for it will optionally add a nameserver 127.0.0.1 line as lo.named.



                Since /etc/resolvconf/interface-order file says that lo takes priority over anything else, the search line from lo.inet will always go to the real /etc/resolv.conf. If my BIND is running, it will be used as a local nameserver; but if it fails for some reason and systemd is unable to restart it, the dependencies in systemd configuration will cause the lo.named to be removed, and then nameserver 127.0.0.1 in /etc/resolv.conf will be automatically replaced by ISP's nameservers.






                share|improve this answer












                ls /etc/resolvconf/run/interface


                will list all the pieces of nameserver information that have been added to resolvconf database. Their names will usually identify the interface to which they're associated, and possibly other things.



                These are all text files, effectively fragments of /etc/resolv.conf. So you can view them with any text viewer utility.



                For example, on my home gateway system (Debian 9):



                # ls /etc/resolvconf/run/interface/
                eth2.dhclient eth2.ip6.dhclient lo.inet lo.named


                eth2 is my external interface that gets its configuration via DHCP. The default domain and IPv4 DNS servers provided by my ISP's DHCP server are in file eth2.dhclient. The file eth2.ip6.dhclient has the same information for IPv6. lo.inet contains the domain search line I've set locally, and it overrides the default domain set by the ISP. And since I run a local BIND for my private home DNS domain, once BIND has started up, Debian's systemd configuration for it will optionally add a nameserver 127.0.0.1 line as lo.named.



                Since /etc/resolvconf/interface-order file says that lo takes priority over anything else, the search line from lo.inet will always go to the real /etc/resolv.conf. If my BIND is running, it will be used as a local nameserver; but if it fails for some reason and systemd is unable to restart it, the dependencies in systemd configuration will cause the lo.named to be removed, and then nameserver 127.0.0.1 in /etc/resolv.conf will be automatically replaced by ISP's nameservers.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 23 '17 at 17:05









                telcoM

                10.8k11232




                10.8k11232






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f412686%2fhow-to-query-the-resolvconf-database%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay