Hey everyone, I wanted to ask for some help regarding my DNS setup and for routing requests to my selfhosted services.
Currently I use Pi-Hole as a DNS server with my routers default DNS server as the upstream server. This allowed me to define local DNS entries using Pi-hole and route my requests to these domains directly to my local services. For example I bought a domain a while ago and in preparation for setting it up, I had it entered as a local DNS entry pointing directly to my servers IP address.
Earlier today I finally got around to setting up a cloudflare tunnel to expose one of my services to the outside world using the domain I bought. Ever since I did that, all requests to that domain seem to exit my home network, go through cloudflares network and then return through the tunnel, even though I have a local DNS entry for that domain name.
What I would prefer is for the request to be routed directly to my server instead, since I am in the same network already. Since my DNS server is the Pi-Hole, I figured this should happen automatically.
Is there an issue with my Pi-Hole setup? If there is any information missing I’ll be happy to provide it. I wasn’t sure what information I could safely post here.
MangoPenguin@lemmy.blahaj.zone 1 year ago
Easy to diagnose, what does nslookup return for the hostname?
Scrath@feddit.de 1 year ago
It returned the local IPv4 address of the server and two IPv6 addresses belonging apparently belonging to a cloudflare server in california.
I think I managed to fix the issue though. I have updated my post to include my solution
MangoPenguin@lemmy.blahaj.zone 1 year ago
Ah that makes sense, if your server has an IPv6 address you could add another A record in Pihole for that. But it sounds like clearing the cache and stuff solved it.