How to specify more than one DNS in resolvconf.conf?












1














I am trying to make resolvconf prepend two additional nameservers to /etc/resolv.conf when run with "resolvconf -u".
My /etc/resolvconf.conf file is as follows:



# Configuration for resolvconf(8)
# See resolvconf.conf(5) for details

resolv_conf=/etc/resolv.conf
# If you run a local name server, you should uncomment the below line and
# configure your subscribers configuration files below.
name_servers=1.1.1.1 1.0.0.1

# Mirror the Debian package defaults for the below resolvers
# so that resolvconf integrates seemlessly.
dnsmasq_resolv=/var/run/dnsmasq/resolv.conf
pdnsd_conf=/etc/pdnsd.conf
unbound_conf=/var/cache/unbound/resolvconf_resolvers.conf


The problem emerges when I run the command "resolvconf -u", this is the output I get:



/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found


If I specify just ONE SINGLE DNS in the name_servers line it works fine. I also tried to wrap the DNS definitions with "", but it still doesn't accept them. I can't find anything about the correct syntax in the manual.










share|improve this question




















  • 1




    repeat the line name_servers=x.x.x.x for each DNS server you want to specify.
    – Mioriin
    May 3 at 3:15
















1














I am trying to make resolvconf prepend two additional nameservers to /etc/resolv.conf when run with "resolvconf -u".
My /etc/resolvconf.conf file is as follows:



# Configuration for resolvconf(8)
# See resolvconf.conf(5) for details

resolv_conf=/etc/resolv.conf
# If you run a local name server, you should uncomment the below line and
# configure your subscribers configuration files below.
name_servers=1.1.1.1 1.0.0.1

# Mirror the Debian package defaults for the below resolvers
# so that resolvconf integrates seemlessly.
dnsmasq_resolv=/var/run/dnsmasq/resolv.conf
pdnsd_conf=/etc/pdnsd.conf
unbound_conf=/var/cache/unbound/resolvconf_resolvers.conf


The problem emerges when I run the command "resolvconf -u", this is the output I get:



/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found


If I specify just ONE SINGLE DNS in the name_servers line it works fine. I also tried to wrap the DNS definitions with "", but it still doesn't accept them. I can't find anything about the correct syntax in the manual.










share|improve this question




















  • 1




    repeat the line name_servers=x.x.x.x for each DNS server you want to specify.
    – Mioriin
    May 3 at 3:15














1












1








1







I am trying to make resolvconf prepend two additional nameservers to /etc/resolv.conf when run with "resolvconf -u".
My /etc/resolvconf.conf file is as follows:



# Configuration for resolvconf(8)
# See resolvconf.conf(5) for details

resolv_conf=/etc/resolv.conf
# If you run a local name server, you should uncomment the below line and
# configure your subscribers configuration files below.
name_servers=1.1.1.1 1.0.0.1

# Mirror the Debian package defaults for the below resolvers
# so that resolvconf integrates seemlessly.
dnsmasq_resolv=/var/run/dnsmasq/resolv.conf
pdnsd_conf=/etc/pdnsd.conf
unbound_conf=/var/cache/unbound/resolvconf_resolvers.conf


The problem emerges when I run the command "resolvconf -u", this is the output I get:



/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found


If I specify just ONE SINGLE DNS in the name_servers line it works fine. I also tried to wrap the DNS definitions with "", but it still doesn't accept them. I can't find anything about the correct syntax in the manual.










share|improve this question















I am trying to make resolvconf prepend two additional nameservers to /etc/resolv.conf when run with "resolvconf -u".
My /etc/resolvconf.conf file is as follows:



# Configuration for resolvconf(8)
# See resolvconf.conf(5) for details

resolv_conf=/etc/resolv.conf
# If you run a local name server, you should uncomment the below line and
# configure your subscribers configuration files below.
name_servers=1.1.1.1 1.0.0.1

# Mirror the Debian package defaults for the below resolvers
# so that resolvconf integrates seemlessly.
dnsmasq_resolv=/var/run/dnsmasq/resolv.conf
pdnsd_conf=/etc/pdnsd.conf
unbound_conf=/var/cache/unbound/resolvconf_resolvers.conf


The problem emerges when I run the command "resolvconf -u", this is the output I get:



/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found


If I specify just ONE SINGLE DNS in the name_servers line it works fine. I also tried to wrap the DNS definitions with "", but it still doesn't accept them. I can't find anything about the correct syntax in the manual.







dns resolv.conf resolvconf






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 1 hour ago









Rui F Ribeiro

38.9k1479129




38.9k1479129










asked May 3 at 3:12









Michele

82




82








  • 1




    repeat the line name_servers=x.x.x.x for each DNS server you want to specify.
    – Mioriin
    May 3 at 3:15














  • 1




    repeat the line name_servers=x.x.x.x for each DNS server you want to specify.
    – Mioriin
    May 3 at 3:15








1




1




repeat the line name_servers=x.x.x.x for each DNS server you want to specify.
– Mioriin
May 3 at 3:15




repeat the line name_servers=x.x.x.x for each DNS server you want to specify.
– Mioriin
May 3 at 3:15










1 Answer
1






active

oldest

votes


















1














/sbin/resolvconf is actually a shell script, and the configuration files are just sourced scripts, so the syntax you'll need is the same as with shell scripts:



name_servers="1.1.1.1 1.0.0.1"





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',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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%2funix.stackexchange.com%2fquestions%2f441440%2fhow-to-specify-more-than-one-dns-in-resolvconf-conf%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    /sbin/resolvconf is actually a shell script, and the configuration files are just sourced scripts, so the syntax you'll need is the same as with shell scripts:



    name_servers="1.1.1.1 1.0.0.1"





    share|improve this answer


























      1














      /sbin/resolvconf is actually a shell script, and the configuration files are just sourced scripts, so the syntax you'll need is the same as with shell scripts:



      name_servers="1.1.1.1 1.0.0.1"





      share|improve this answer
























        1












        1








        1






        /sbin/resolvconf is actually a shell script, and the configuration files are just sourced scripts, so the syntax you'll need is the same as with shell scripts:



        name_servers="1.1.1.1 1.0.0.1"





        share|improve this answer












        /sbin/resolvconf is actually a shell script, and the configuration files are just sourced scripts, so the syntax you'll need is the same as with shell scripts:



        name_servers="1.1.1.1 1.0.0.1"






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered May 3 at 4:55









        telcoM

        15.7k12143




        15.7k12143






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • 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%2funix.stackexchange.com%2fquestions%2f441440%2fhow-to-specify-more-than-one-dns-in-resolvconf-conf%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

            サソリ

            広島県道265号伴広島線

            Accessing regular linux commands in Huawei's Dopra Linux