{"id":19328,"date":"2021-01-08T11:22:11","date_gmt":"2021-01-08T16:22:11","guid":{"rendered":"https:\/\/nuxx.net\/blog\/?p=19328"},"modified":"2021-11-09T17:35:04","modified_gmt":"2021-11-09T22:35:04","slug":"pi-hole-via-docker-on-synology-dsm-with-bonded-network-interface","status":"publish","type":"post","link":"https:\/\/nuxx.net\/blog\/2021\/01\/08\/pi-hole-via-docker-on-synology-dsm-with-bonded-network-interface\/","title":{"rendered":"Pi-hole via Docker on Synology DSM with Bonded Network Interface"},"content":{"rendered":"\n<p>With consolidating and upgrading my home network I&#8217;m moving <a href=\"https:\/\/pi-hole.net\/\">Pi-hole<\/a> from a stand-alone Raspberry Pi to running under Docker on my Synology DS1019+ running DiskStation Manager (DSM) v6.2.3.<\/p>\n\n\n\n<p>This was a little bit confusing at first as the web management UI would work, but DNS queries weren&#8217;t getting answered. This ended up being caused by the <a href=\"https:\/\/www.synology.com\/en-global\/knowledgebase\/DSM\/help\/DSM\/AdminCenter\/connection_network_linkaggr\">bonded network interface<\/a>, which is <code>ovs_bond0<\/code> instead of the normal default of <code>eth0<\/code>.<\/p>\n\n\n\n<p>Using the official <a href=\"https:\/\/registry.hub.docker.com\/r\/pihole\/pihole\/\">Pi-hole Docker image<\/a>, set to run with Host networking (<em>Use the same network as Docker host<\/em> in the Synology UI), setting or changing the following variables will set up Pi-hole work from first boot, configured to:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Listen on <code>ovs_bond0<\/code> (instead of the default <code>eth0<\/code>).<\/li><li>Answer DNS queries on the same IP as DSM (<code>192.168.0.2<\/code>).<\/li><li>Run the with the web-based management interface on port 8081 with password <code>piholepassword<\/code>.<\/li><li>Send internal name resolutions to the internal DNS\/DHCP server at <code>192.168.0.1<\/code> for clients <code>*.internal.example.com<\/code> within <code>192.168.0.0\/24<\/code>.<\/li><li>Set the displayed temperature to Farenheit and time zone to <code>America\/Detroit<\/code>.<\/li><li>Listen for HTTP requests on  <code>http:\/\/diskstation.internal.example.com:8081<\/code> along side the default <code>pi.hole<\/code> hostname.<\/li><\/ul>\n\n\n\n<p><code>DNS=127.0.0.1<br>INTERFACE=ovs_bond0<br>REV_SERVER=True<br>REV_SERVER_CIDR=192.168.0.0\/24<br>REV_SERVER_DOMAIN=internal.example.com<br>REV_SERVER_TARGET=192.168.0.1<br>ServerIP: 192.168.0.2<br>TEMPERATUREUNIT=f<br>TZ: America\/Detroit<br>VIRTUAL_HOST: diskstation.internal.example.com<br>WEB_PORT: 8081<br>WEBPASSWORD: piholepassword<\/code><\/p>\n\n\n\n<p>Additionally, setting up volumes for <code>\/etc\/dnsmasq.d\/<\/code> and <code>\/etc\/pihole\/<\/code> will ensure changes to the UI persist across restarts and container upgrades. I do this as shown here:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2021\/01\/pihole_volumes_docker_on_dsm.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2021\/01\/pihole_volumes_docker_on_dsm-1024x865.png\" alt=\"\" class=\"wp-image-19331\" width=\"512\" height=\"433\" srcset=\"https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2021\/01\/pihole_volumes_docker_on_dsm-1024x865.png 1024w, https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2021\/01\/pihole_volumes_docker_on_dsm-300x253.png 300w, https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2021\/01\/pihole_volumes_docker_on_dsm-768x649.png 768w, https:\/\/nuxx.net\/blog\/wp-content\/uploads\/2021\/01\/pihole_volumes_docker_on_dsm.png 1324w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>Note: If you stop the Pi-hole container, clear out the contents of these directories, and then restart the container, Pi-hole will set itself up again from the environment variables. This allows tweaking the variables without recreating the container each time.<\/p>\n\n\n\n<p><strong>UPDATE:<\/strong> With the update to <a href=\"https:\/\/www.synology.com\/en-us\/DSM70\">Synology DSM 7.0<\/a> the interface is now called <code>bond0<\/code>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With consolidating and upgrading my home network I&#8217;m moving Pi-hole from a stand-alone Raspberry Pi to running under Docker on my Synology DS1019+ running DiskStation&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/nuxx.net\/blog\/2021\/01\/08\/pi-hole-via-docker-on-synology-dsm-with-bonded-network-interface\/\">Continue reading<span class=\"screen-reader-text\">Pi-hole via Docker on Synology DSM with Bonded Network Interface<\/span><\/a><\/div>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,13],"tags":[],"class_list":["post-19328","post","type-post","status-publish","format-standard","hentry","category-around-the-house","category-computers","entry"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/posts\/19328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/comments?post=19328"}],"version-history":[{"count":6,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/posts\/19328\/revisions"}],"predecessor-version":[{"id":19468,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/posts\/19328\/revisions\/19468"}],"wp:attachment":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/media?parent=19328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/categories?post=19328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/tags?post=19328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}