Custom DNS Server in local network
-
Hi,
I’ve seen https://docs.cloudron.io/networking/ but can’t figure out how to point my local Pi-Hole. I’m using the www.dietpi.com implementation that comes with unbound on a separate Pi.
I have created
/etc/unbound/unbound.conf.d/custom.conf
and addedserver: private-domain: "cloudron.lan" domain-insecure: "cloudron.lan" forward-zone: name: "cloudron.lan" forward-addr: 192.168.1.20
(or is
cloudron.lan
just an example?)Note that my local router is pointed to the same DNS server.
-
@necrevistonnezr If I understand correctly, you want to make Cloudron use the pi to resolve all the DNS queries?
The configuration listed in the docs is meant to tell unbound that any queries for
cloudron.lan
(this is just the name of your internal network, so just an example used in the config) should go to192.168.1.20
(the internal DNS server). So, it won't make all the queries go to the PI, justcloudron.lan
queries.I haven't tried it but as per https://wiki.alpinelinux.org/wiki/Setting_up_unbound_DNS_server , if you put the below it will forward everything:
forward-zone: name: "." forward-addr: <your pi ip>
-
@girish I have a similar issue so instead of starting a new thread I thought I'll post here. My VM running cloudron is unable to resolve nameservers since installing unbound on my router. Came across this thread and added the below lines to /etc/unbound/unbound.conf.d/custom.conf
server:
private-domain: "cloudron.lan"
domain-insecure: "cloudron.lan"
forward-zone:
name: "cloudron.lan"
forward-addr: 192.168.1.1
It worked for few days and broke again today, access to cloudron still works but when logged on to the VM it cannot resolve DNS queries, hope it makes sense. Any ideas why DNS resolution works intermittently? -
@khadanja Is your idea to forward all queries ? The example config you pasted will only forward DNS queries for
cloudron.lan
(sic). You need the config in https://forum.cloudron.io/topic/5756/custom-dns-server-in-local-network/2 to forward all queries to your router. -