„local IP addresses“ are not recognized as local (container)

Hi, I have installed Pihole as container on RaspberryPi. The context is a home network (192.168.0.0/24 behind a Fritzbox).

I tried to configure it to answer DNS requests from clients in the local network.

This failed, because Pihole does not consider e.g. client IP 192.168.0.139 as „local“ and rejected the query. (It works fine with „all requests fron en0“).

Is there a setting to teach Pihole in the container which is the local network?

Thank you
Thomas

Please provide some examples from the query log or the dnsmasq log (/var/log/pihole.log) showing these queries, forwards and replies.

https://d.pr/i/5sgDmI

Screenshot from the GUI to illustrate that dnsmasq does not know what the local network is.

Thank you
Thomas

What networking mode are you using for docker? If it's a bridge network then the container won't know what the LAN network is, only what it's docker network subnet is.

Easiest solution is to Permit All Origins in the Settings page of the Admin panel.

1 Like

Thank you. Yes this is the problem (container used own network; I used the docker-compose.yml from https://github.com/pi-hole/docker-pi-hole

And yes, the other options do work.

Just interested to know, if I can teach dnsmasq which network it should consider as local (instead of letting it inspect its network).

Thank you
Thomas

Not with the existing environment variables. If you want to pihole-FTL (dnsmasq) to have that information you'd need to use host mode networking and eliminate the docker bridge isolation.

1 Like

Thank you Dan.
Good to know. In my situation I can live with the other options, maybe I experiment with a bridged container in the future.

Thanks for the help!

Thomas

1 Like

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