I want to be able to use the one container option method together with macvlan. The reason for using macvlan is I want my DNS server (pihole + unbound) to have its own IP address in the host network separate from the host IP. So I have this docker compose:
With this config, unbound does not reply to DNS queries from the localhost, most probably because unbound sees the source IP of the query as not coming from localhost but from the macvlan IP that I assigned to the container:
If that's the case, the /etc/unbound/unbound.conf.d/pi-hole.conf file needs to be edited to include an access-list: 192.168.20.102/32 allow entry. However, I don't know how to edit the pi-hole.conf file inside the container without it being overwritten upon container update or restart. If I include this volume: - ${DOCKERCONFDIR}/pihole-unbound/etc-unbound.conf.d:/etc/unbound/unbound.conf.d it deletes all the conf files in that directory inside the container.
I also want to be able to use DNS-over-TLS with this container so unbound will act as a forwarder like the one explained in your two container option. Which file do I edit for this? unbound.sh? If so, where is that file? Do I need a volume for that?
P.S. I'm not a Linux expert and I only know the basic of docker containers.
I want to be able to use the one container option method together with macvlan. The reason for using macvlan is I want my DNS server (pihole + unbound) to have its own IP address in the host network separate from the host IP. So I have this docker compose:
With this config, unbound does not reply to DNS queries from the localhost, most probably because unbound sees the source IP of the query as not coming from localhost but from the macvlan IP that I assigned to the container:
If that's the case, the
/etc/unbound/unbound.conf.d/pi-hole.conf
file needs to be edited to include anaccess-list: 192.168.20.102/32 allow
entry. However, I don't know how to edit thepi-hole.conf
file inside the container without it being overwritten upon container update or restart. If I include this volume:- ${DOCKERCONFDIR}/pihole-unbound/etc-unbound.conf.d:/etc/unbound/unbound.conf.d
it deletes all the conf files in that directory inside the container.I also want to be able to use DNS-over-TLS with this container so unbound will act as a forwarder like the one explained in your two container option. Which file do I edit for this?
unbound.sh
? If so, where is that file? Do I need a volume for that?P.S. I'm not a Linux expert and I only know the basic of docker containers.