Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Local DNS names #1661

Open
awptechnologies opened this issue Nov 18, 2024 · 9 comments
Open

Issue with Local DNS names #1661

awptechnologies opened this issue Nov 18, 2024 · 9 comments

Comments

@awptechnologies
Copy link

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
Copy link
Member

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
Copy link
Author

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
Copy link
Author

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
Copy link
Member

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
Copy link
Author

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

@awptechnologies
Copy link
Author

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
Copy link
Member

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
Copy link
Author

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
Copy link
Member

Please generate a debug log and post the token here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants