pi-hole / docker-pi-hole

Pi-hole in a docker container
https://pi-hole.net
Other
8.59k stars 1.13k forks source link

Issue with Local DNS names #1661

Open awptechnologies opened 4 days ago

awptechnologies commented 4 days ago

Before upgrading to pihole developmental v6 on alpine all of my local dns names from opnsense were showed in the pihole ui without enabling any kind of reverse dns server.

I pass through the info from opnsense using the config in this link. https://pi-hole.net/blog/2021/09/30/pi-hole-and-opnsense/#page-content

Basically add

add-mac add-subnet=32,128

to /usr/local/etc/dnsmasq.conf.d/edns0.conf on opnsense.

There are no logs that reflect anything about this in the pihole container so i didn't post any. Just wanted to see what the devs thought.

yubiuser commented 4 days ago

I assume your use opensense as upstream DNS server for all your clients and Pi-hole as upstream for opensense?

Client -> Opsensense -> Pi-hole -> Internet

This is a valid configuration. By default, from Pi-hole's view all queries originate from opensense and there is no way for Pi-hole to know from where the query originated in the first place. By adding the two lines above you told opensense to amend MAC and sub-net information to each query (EDNS data) sent upstream to Pi-hole. Pi-hole will recognize this information and is now able to display where the query came from in the first place.

awptechnologies commented 4 days ago

Yes correct i think.

I use opnsense as the dns for all my clients to connect to and where all of my local dns names are stored for services and hosts. then pihole sits upstream.

I can see the ip addresses in pihole that all seems to be fine. If i remove those 2 lines from opnsense it shows all querys comming from opnsense so i believe setup is right.

In the old debian based pihold not only would it show the ip address but it would also show the dns name that was set in opnsense. on the new pihole based on alpine it shows ip but no dns names.

awptechnologies commented 4 days ago

Also i built the new pihole version to also act as a recursive dns with unbound. idk if that has anything to do with it since i did the same thing with the debian based.

you can check it out with this

docker pull gitea.awptechnologies.co/awptechnologies/pihole-unbound:dev

yubiuser commented 4 days ago

In the old debian based pihold not only would it show the ip address but it would also show the dns name that was set in opnsense. on the new pihole based on alpine it shows ip but no dns names.

Something else must have changed on your setup. There is no difference regarding reverse lookup between those two - and it does not depend on Debian vs. Alpine. Either you had configured Pi-hole to use Opensense as reverse dns server or you added some local DNS records in Pi-hole so it could attribute the IP to the hostnames.

awptechnologies commented 4 days ago

Enabling reverse dns server is technically the only way this would work correct?

awptechnologies commented 4 days ago

Also is there a way i can port my unbound dns logs into the pihole interface? In the tools drop down under tail log files can i add my own category by editing a file somewhere?

yubiuser commented 4 days ago

Enabling reverse dns server is technically the only way this would work correct?

Yes. Or you define local DNS records for every client.


Also is there a way i can port my unbound dns logs into the pihole interface? In the tools drop down under tail log files can i add my own category by editing a file somewhere?

This is not possible without heavily modifying Pi-hole's code. I recommend something like https://github.com/amir20/dozzle to get a nice web UI for all your Docker logs

awptechnologies commented 4 days ago

After enabling reverse server which please let me know if this is the correct format. true,192.168.1.0/24,192.168.1.1,lab.example.com

Of course the domain is different for my lab. again i just want to verify the format.

So my issue: After enabling this i am getting: Maximum number of concurrent DNS queries reached (max: 150)

Even when i delete the error it comes right back. I have had this error once or twice in the past but this is over and over again. Why would enabling reverse dns server cause this?

yubiuser commented 4 days ago

Please generate a debug log and post the token here.