Synology NAS - Pihole running but no DNS passthrough

Expected Behaviour:

Synology NAS DSM 7.2 - Pihole running and the DNS working. Running via Container Manager with a macvlan networking with a Pihole container connected to that.

Actual Behaviour:

Pihole seems to be up and running correctly, no errors in the dashboard. However, when setting my router DNS to use the docker IP for the container, all devices get no internet. I have the DNS set to allow the interface allow all local devices.

The log looks strange to me when it says "failed to resolve eth0 on (the IP)". I'm not sure why that would be the case and that may be the issue but i'm not sure. I did have to change in docker port 80 to port 8080 because it looks like something may already be using port 80 and wouldn't let me save the setting changes.

Thank you for your help.

Debug Token:

https://tricorder.pi-hole.net/hpIOWvIp/

How did you start the container?

Please, post the compose file or docker run command used to start your container. If you used the Container Manager interface, post some container details (ENV variables, volumes, etc.).

Also, how did you create/setup the macvlan? Post macvlan network details (subnet range, IP) and the host IP.

Note:

I did have to change in docker port 80 to port 8080 because it looks like something may already be using port 80 and wouldn't let me save the setting changes.

This is not possible if the container is really using macvlan.
Inside Pi-hole container only the web interface use port 80 and no conflicts are possible.

Thanks for your reply, here's the container file. I followed this guide (How to Set Up Pi-hole on a Synology NAS - WunderTech) and SSH commands on setting up the macvlan and the container.


{
   "CapAdd" : [],
   "CapDrop" : [],
   "cmd" : "",
   "cpu_priority" : 50,
   "enable_publish_all_ports" : false,
   "enable_restart_policy" : true,
   "enable_service_portal" : null,
   "enabled" : true,
   "env_variables" : [
      {
         "key" : "PATH",
         "value" : "/opt/pihole:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
      },
      {
         "key" : "phpver",
         "value" : "php"
      },
      {
         "key" : "PHP_ERROR_LOG",
         "value" : "/var/log/lighttpd/error-pihole.log"
      },
      {
         "key" : "IPv6",
         "value" : "True"
      },
      {
         "key" : "S6_KEEP_ENV",
         "value" : "1"
      },
      {
         "key" : "S6_BEHAVIOUR_IF_STAGE2_FAILS",
         "value" : "2"
      },
      {
         "key" : "S6_CMD_WAIT_FOR_SERVICES_MAXTIME",
         "value" : "0"
      },
      {
         "key" : "FTLCONF_LOCAL_IPV4",
         "value" : "0.0.0.0"
      },
      {
         "key" : "FTL_CMD",
         "value" : "no-daemon"
      },
      {
         "key" : "DNSMASQ_USER",
         "value" : "root"
      },
      {
         "key" : "WEBPASSWORD",
         "value" : "HIDDEN"
      },
      {
         "key" : "TZ",
         "value" : "America/New_York"
      },
      {
         "key" : "DNSMASQ_LISTENING",
         "value" : "local"
      },
      {
         "key" : "VIRTUAL_HOST",
         "value" : "pihole"
      },
      {
         "key" : "ServerIP",
         "value" : "192.168.1.150"
      }
   ],
   "exporting" : false,
   "id" : "bd8bc797ac173e042ffb2221a4b9f8de2181624955015a69aea31597ba64a0ef",
   "image" : "pihole/pihole:latest",
   "is_ddsm" : false,
   "is_package" : false,
   "labels" : {
      "com.docker.compose.config-hash" : "ce2507be5ce8b585363a961db83407940b846ebfb83b0cc3377bf2c66682fa5b",
      "com.docker.compose.container-number" : "1",
      "com.docker.compose.depends_on" : "",
      "com.docker.compose.image" : "sha256:927e9854247157c40259b84b60d3e774283ba12fc91ea0feab86536320deebb1",
      "com.docker.compose.oneoff" : "False",
      "com.docker.compose.project" : "pihole",
      "com.docker.compose.project.config_files" : "/volume1/docker/pihole/compose.yaml",
      "com.docker.compose.project.working_dir" : "/volume1/docker/pihole",
      "com.docker.compose.service" : "pihole",
      "com.docker.compose.version" : "2.9.0",
      "org.opencontainers.image.created" : "2023-05-30T18:51:05.660Z",
      "org.opencontainers.image.description" : "Pi-hole in a docker container",
      "org.opencontainers.image.licenses" : "",
      "org.opencontainers.image.revision" : "37bd3d2f0f9321211d9370fc96b7d06325cee887",
      "org.opencontainers.image.source" : "https://github.com/pi-hole/docker-pi-hole",
      "org.opencontainers.image.title" : "docker-pi-hole",
      "org.opencontainers.image.url" : "https://github.com/pi-hole/docker-pi-hole",
      "org.opencontainers.image.version" : "2023.05.2"
   },
   "links" : [],
   "memory_limit" : 0,
   "name" : "pihole",
   "network" : [
      {
         "driver" : "macvlan",
         "name" : "ph_network"
      }
   ],
   "network_mode" : "ph_network",
   "port_bindings" : [
      {
         "container_port" : 53,
         "host_port" : 53,
         "type" : "tcp"
      },
      {
         "container_port" : 53,
         "host_port" : 53,
         "type" : "udp"
      },
      {
         "container_port" : 8080,
         "host_port" : 8080,
         "type" : "tcp"
      }
   ],
   "privileged" : true,
   "shortcut" : {
      "enable_shortcut" : false,
      "enable_status_page" : false,
      "enable_web_page" : false,
      "web_page_url" : ""
   },
   "use_host_network" : false,
   "version" : 2,
   "volume_bindings" : [
      {
         "host_volume_file" : "/docker/pihole/pihole",
         "is_directory" : true,
         "mount_point" : "/etc/pihole",
         "type" : "rw"
      },
      {
         "host_volume_file" : "/docker/pihole/dnsmasq.d",
         "is_directory" : true,
         "mount_point" : "/etc/dnsmasq.d",
         "type" : "rw"
      }
   ]
}

Actually, you shouldn't publish ports with macvlan mode.
All ports are already exposed and you don't need the ports section.

Another thing: remove the deprecated ServerIP variable and replace it with FTLCONF_LOCAL_IPV4 = 192.168.1.150.

Change the items above and recreate the container.

After the new container is running, from a client (not from docker host), what is the output of:

nslookup google.com 192.168.1.150

nslookup flurry.com 192.168.1.150

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.