If you want DNS only in your LAN, you need to self host a DNS server and register this domain locally (by putting it in some config file of yours)
Comment on How to reverse proxy?
beeng@discuss.tchncs.de 19 hours agoIs this a local address or a public IP address?
I just want the resolving internal to my network but I never got it working right.
PlexSheep@infosec.pub 17 hours ago
Scrath@lemmy.dbzer0.com 18 hours ago
I’m not the guy you replied to but personally I use a setup called split-horizon DNS.
This is a little bit of a simplification. I also use a cloudflare tunnel to allow access to select subdomains and I have 2 reverse-proxies chained together since NPM can resolve services by their container name as long as they are in the same docker network.
Also probably important: My DNS server was a pi-hole (until today at least) and did not act as my DHCP server. This meant it had no idea of local device hostnames and therefore was configured to forward queries to local device names to my routers built-in DNS server.
DevotedOtter@lemm.ee 14 hours ago
I’m looking to do something like this. I’m uneasy about having the registered domain pointing towards my IP address (partially because I’m unsure of the exact risks and partially because I’d rather do it internally if possible).
You said you were using pihole. What did you change to and why did you change? Pihole seems the most recommended from what I’ve seen?
Scrath@lemmy.dbzer0.com 4 hours ago
You are lucky I haven’t deleted my pi-hole VM yet ;D
In the Pi-Hole DNS settings I have the following configuration:
true,192.168.1.0/24,192.168.1.1,fritz.box
.fritz.box
was my local DHCP domain name but has since been changed tolan
.The other settings in Pi-Hole were under the Local DNS Records menu where I added my domain name (let’s call it example.com) to the list of local DNS records and pointed it at the IP of the server running my reverse-proxy. Finally I added each subdomain I wanted to use to the List of local CNAME records and pointed it at the domain I just entered to the other list.
I can’t perfectly tell you what my router settings were unfortunately since I have recently moved and replaced my fritzbox with a mikrotik router. The main thing you have to do though is to go to the DHCP server settings of your router and set the pi-holes IP address as the DNS server. Note that in the case of the pi-hole being offline for any reason you will be unable to resolve any domains while in this network
It might be possible to do some sort of failover setup by running a second pi-hole with identical settings but I did not want my network connectivity depending on any device other than my router being on. Hence my move back to using my mikrotiks built-in DNS server which fortunately also supports adding lists for DNS adblocking.