Server name resolution messed up when running PiHole in Docker Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Run DNS service on registered domain for global name resolutionHow do I run Juju on a local server?Access docker container by FQDNRun a desktop environment from a docker containerRunning as a host user within a Docker containerstop systemd DNS madnessHow should I be doing LAN name resolution on 18.04Ubuntu 18.04 Login window loop18.04 / OpenVPN / SSH / DockerWhy is dhclient + systemd-resolved restarting frequently?

For a new assistant professor in CS, how to build/manage a publication pipeline

Is it ethical to give a final exam after the professor has quit before teaching the remaining chapters of the course?

Why are the trig functions versine, haversine, exsecant, etc, rarely used in modern mathematics?

Why do we bend a book to keep it straight?

Extracting terms with certain heads in a function

How do pianists reach extremely loud dynamics?

How do I make this wiring inside cabinet safer? (Pic)

Circuit to "zoom in" on mV fluctuations of a DC signal?

An adverb for when you're not exaggerating

8 Prisoners wearing hats

Can melee weapons be used to deliver Contact Poisons?

Amount of permutations on an NxNxN Rubik's Cube

What would be the ideal power source for a cybernetic eye?

How to react to hostile behavior from a senior developer?

Is there any way for the UK Prime Minister to make a motion directly dependent on Government confidence?

Novel: non-telepath helps overthrow rule by telepaths

Do jazz musicians improvise on the parent scale in addition to the chord-scales?

Ports Showing Closed/Filtered in Nmap Scans

Can anything be seen from the center of the Boötes void? How dark would it be?

Trademark violation for app?

Withdrew £2800, but only £2000 shows as withdrawn on online banking; what are my obligations?

What does the "x" in "x86" represent?

Do I really need recursive chmod to restrict access to a folder?

Can you shove before Attacking with Shield Master using a Readied action?



Server name resolution messed up when running PiHole in Docker



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Run DNS service on registered domain for global name resolutionHow do I run Juju on a local server?Access docker container by FQDNRun a desktop environment from a docker containerRunning as a host user within a Docker containerstop systemd DNS madnessHow should I be doing LAN name resolution on 18.04Ubuntu 18.04 Login window loop18.04 / OpenVPN / SSH / DockerWhy is dhclient + systemd-resolved restarting frequently?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















Yesterday I installed PiHole as a Docker container on my home server along with several other containers. While the ad blocking works fine after some adjustments, I also had to disable the dnsmasq and systemd/resolved as per the docs. This caused my home server to lose all name resolution but if I didn't do this the PiHole container complained about the host port 53 being locked and wouldn't start.



How can I enable name resolution outside Docker on my server while still running the PiHole container for other network devices?



I'm running Ubuntu 18.04 Server with a static IP in the 192.168.1.0/24 range.










share|improve this question




























    1















    Yesterday I installed PiHole as a Docker container on my home server along with several other containers. While the ad blocking works fine after some adjustments, I also had to disable the dnsmasq and systemd/resolved as per the docs. This caused my home server to lose all name resolution but if I didn't do this the PiHole container complained about the host port 53 being locked and wouldn't start.



    How can I enable name resolution outside Docker on my server while still running the PiHole container for other network devices?



    I'm running Ubuntu 18.04 Server with a static IP in the 192.168.1.0/24 range.










    share|improve this question
























      1












      1








      1








      Yesterday I installed PiHole as a Docker container on my home server along with several other containers. While the ad blocking works fine after some adjustments, I also had to disable the dnsmasq and systemd/resolved as per the docs. This caused my home server to lose all name resolution but if I didn't do this the PiHole container complained about the host port 53 being locked and wouldn't start.



      How can I enable name resolution outside Docker on my server while still running the PiHole container for other network devices?



      I'm running Ubuntu 18.04 Server with a static IP in the 192.168.1.0/24 range.










      share|improve this question














      Yesterday I installed PiHole as a Docker container on my home server along with several other containers. While the ad blocking works fine after some adjustments, I also had to disable the dnsmasq and systemd/resolved as per the docs. This caused my home server to lose all name resolution but if I didn't do this the PiHole container complained about the host port 53 being locked and wouldn't start.



      How can I enable name resolution outside Docker on my server while still running the PiHole container for other network devices?



      I'm running Ubuntu 18.04 Server with a static IP in the 192.168.1.0/24 range.







      networking 18.04 dns docker






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 20 '18 at 16:37









      ZarkovZarkov

      61119




      61119




















          1 Answer
          1






          active

          oldest

          votes


















          0














          I had the same problem.



          I have my routers DHCP point all devices on the network to use my PiHole as DNS.
          The PiHole lives in a Docker container on one of the machines running Ubuntu 18.10 on the network.



          I have had to have that machine ignore the DNS coming from the DHCP and instead have the Ubuntu machine use the name servers of my ISP (below I will use 1.1.1.1 and 8.8.8.8 just as an example).



          I am running NetworkManager, so have had to change /etc/NetworkManager/NetworkManager.conf by setting dns=none under [main].



          For the part of ignoring the DHCP given name servers, change: /etc/dhcp/dhclient.conf and add:



          supersede domain-name-servers 1.1.1.1, 8.8.8.8;



          Furthermore, I've updated /etc/resolvconf/resolvconf.d/base by setting nameserver 1.1.1.1



          I also stopped and disabled dnsmsq to avoid any conflict on port 53 when I start Pi-hole running:
          sudo systemctl stop dnsmasq and sudo systemctl disable dnsmasq



          Last, but not least, make sure that you start your Pi-hole container with arguments for DNS, the name servers to forward to, (environment variables DNS1 and DNS2) as well as setting the IP of the container (otherwise it will try to bind to 127.0.0.1:53) by specifying:



          -p 192.168.1.10:53:53/tcp -p 192.168.1.10:53:53/udp



          if 192.168.1.10 is the IP of the machine running the Pi-hole container.



          Hope something here helped.






          share|improve this answer























            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%2f1048268%2fserver-name-resolution-messed-up-when-running-pihole-in-docker%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









            0














            I had the same problem.



            I have my routers DHCP point all devices on the network to use my PiHole as DNS.
            The PiHole lives in a Docker container on one of the machines running Ubuntu 18.10 on the network.



            I have had to have that machine ignore the DNS coming from the DHCP and instead have the Ubuntu machine use the name servers of my ISP (below I will use 1.1.1.1 and 8.8.8.8 just as an example).



            I am running NetworkManager, so have had to change /etc/NetworkManager/NetworkManager.conf by setting dns=none under [main].



            For the part of ignoring the DHCP given name servers, change: /etc/dhcp/dhclient.conf and add:



            supersede domain-name-servers 1.1.1.1, 8.8.8.8;



            Furthermore, I've updated /etc/resolvconf/resolvconf.d/base by setting nameserver 1.1.1.1



            I also stopped and disabled dnsmsq to avoid any conflict on port 53 when I start Pi-hole running:
            sudo systemctl stop dnsmasq and sudo systemctl disable dnsmasq



            Last, but not least, make sure that you start your Pi-hole container with arguments for DNS, the name servers to forward to, (environment variables DNS1 and DNS2) as well as setting the IP of the container (otherwise it will try to bind to 127.0.0.1:53) by specifying:



            -p 192.168.1.10:53:53/tcp -p 192.168.1.10:53:53/udp



            if 192.168.1.10 is the IP of the machine running the Pi-hole container.



            Hope something here helped.






            share|improve this answer



























              0














              I had the same problem.



              I have my routers DHCP point all devices on the network to use my PiHole as DNS.
              The PiHole lives in a Docker container on one of the machines running Ubuntu 18.10 on the network.



              I have had to have that machine ignore the DNS coming from the DHCP and instead have the Ubuntu machine use the name servers of my ISP (below I will use 1.1.1.1 and 8.8.8.8 just as an example).



              I am running NetworkManager, so have had to change /etc/NetworkManager/NetworkManager.conf by setting dns=none under [main].



              For the part of ignoring the DHCP given name servers, change: /etc/dhcp/dhclient.conf and add:



              supersede domain-name-servers 1.1.1.1, 8.8.8.8;



              Furthermore, I've updated /etc/resolvconf/resolvconf.d/base by setting nameserver 1.1.1.1



              I also stopped and disabled dnsmsq to avoid any conflict on port 53 when I start Pi-hole running:
              sudo systemctl stop dnsmasq and sudo systemctl disable dnsmasq



              Last, but not least, make sure that you start your Pi-hole container with arguments for DNS, the name servers to forward to, (environment variables DNS1 and DNS2) as well as setting the IP of the container (otherwise it will try to bind to 127.0.0.1:53) by specifying:



              -p 192.168.1.10:53:53/tcp -p 192.168.1.10:53:53/udp



              if 192.168.1.10 is the IP of the machine running the Pi-hole container.



              Hope something here helped.






              share|improve this answer

























                0












                0








                0







                I had the same problem.



                I have my routers DHCP point all devices on the network to use my PiHole as DNS.
                The PiHole lives in a Docker container on one of the machines running Ubuntu 18.10 on the network.



                I have had to have that machine ignore the DNS coming from the DHCP and instead have the Ubuntu machine use the name servers of my ISP (below I will use 1.1.1.1 and 8.8.8.8 just as an example).



                I am running NetworkManager, so have had to change /etc/NetworkManager/NetworkManager.conf by setting dns=none under [main].



                For the part of ignoring the DHCP given name servers, change: /etc/dhcp/dhclient.conf and add:



                supersede domain-name-servers 1.1.1.1, 8.8.8.8;



                Furthermore, I've updated /etc/resolvconf/resolvconf.d/base by setting nameserver 1.1.1.1



                I also stopped and disabled dnsmsq to avoid any conflict on port 53 when I start Pi-hole running:
                sudo systemctl stop dnsmasq and sudo systemctl disable dnsmasq



                Last, but not least, make sure that you start your Pi-hole container with arguments for DNS, the name servers to forward to, (environment variables DNS1 and DNS2) as well as setting the IP of the container (otherwise it will try to bind to 127.0.0.1:53) by specifying:



                -p 192.168.1.10:53:53/tcp -p 192.168.1.10:53:53/udp



                if 192.168.1.10 is the IP of the machine running the Pi-hole container.



                Hope something here helped.






                share|improve this answer













                I had the same problem.



                I have my routers DHCP point all devices on the network to use my PiHole as DNS.
                The PiHole lives in a Docker container on one of the machines running Ubuntu 18.10 on the network.



                I have had to have that machine ignore the DNS coming from the DHCP and instead have the Ubuntu machine use the name servers of my ISP (below I will use 1.1.1.1 and 8.8.8.8 just as an example).



                I am running NetworkManager, so have had to change /etc/NetworkManager/NetworkManager.conf by setting dns=none under [main].



                For the part of ignoring the DHCP given name servers, change: /etc/dhcp/dhclient.conf and add:



                supersede domain-name-servers 1.1.1.1, 8.8.8.8;



                Furthermore, I've updated /etc/resolvconf/resolvconf.d/base by setting nameserver 1.1.1.1



                I also stopped and disabled dnsmsq to avoid any conflict on port 53 when I start Pi-hole running:
                sudo systemctl stop dnsmasq and sudo systemctl disable dnsmasq



                Last, but not least, make sure that you start your Pi-hole container with arguments for DNS, the name servers to forward to, (environment variables DNS1 and DNS2) as well as setting the IP of the container (otherwise it will try to bind to 127.0.0.1:53) by specifying:



                -p 192.168.1.10:53:53/tcp -p 192.168.1.10:53:53/udp



                if 192.168.1.10 is the IP of the machine running the Pi-hole container.



                Hope something here helped.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 14 mins ago









                saidaspensaidaspen

                11029




                11029



























                    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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1048268%2fserver-name-resolution-messed-up-when-running-pihole-in-docker%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

                    Are there any comparative studies done between Ashtavakra Gita and Buddhim?How is it wrong to believe that a self exists, or that it doesn't?Can you criticise or improve Ven. Bodhi's description of MahayanaWas the doctrine of 'Anatta', accepted as doctrine by modern Buddhism, actually taught by the Buddha?Relationship between Buddhism, Hinduism and Yoga?Comparison of Nirvana, Tao and Brahman/AtmaIs there a distinction between “ego identity” and “craving/hating”?Are there many differences between Taoism and Buddhism?Loss of “faith” in buddhismSimilarity between creation in Abrahamic religions and beginning of life in Earth mentioned Agganna Sutta?Are there studies about the difference between meditating in the morning versus in the evening?Can one follow Hinduism and Buddhism at the same time?Are there any prohibitions on participating in other religion's practices?Psychology of 'flow'

                    fallocate: fallocate failed: Text file busy in Ubuntu 17.04? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)defragmenting and increasing performance of old lubuntu system with swap partitionIssue with increasing the root partition from the swapthis /usr/bin/dpkg returned error || ubuntu-16.04, 64bitDefault 17.04 swap file locationHow to Resize Ubuntu 17.04 Zesty Swap file size?Ubuntu freezes from online formsMy Laptop is not starting after upgrade ubuntu 16.04 (Kernel 4.8.0-38 to 04.10.0-36)hcp: ERROR: FALLOCATE FAILED!Not sure my swap is being usedWine 3.0 asking for more virtual free swap

                    Where else does the Shulchan Aruch quote an authority by name?Parashat Metzora+HagadolPesach/PassoverShulchan Aruch UTF-8Anonymous glosses in the Shulchan AruchWhy is the Shulchan Aruch definitive?Siman 32, Kitzur Shulchan Aruch: UntranslatedLitvaks/Yeshivish and Shulchan AruchBuying a Shulchan AruchEnglish version of SHULCHAN ARUCHIs there any place where Shulchan Aruch rules with the Rosh against the Rif and Rambam?Are there practices where Sepharadim do not hold by Shulchan Aruch?5th part of the shulchan aruch