The issue I am facing:
I have my own selfhosted Ubuntu server that runs a lot of Docker containers. The applications that run on the server can be reached by https://[applications].example.com, via a reversed proxy, but only within my local network. This is set up using Cloudflare to get a Let's Encrypt Certificate and Nginx Proxy Manager as proxy manager. Everything works fine and I can reach all my applications using the given URL. For example, PortNote is reached trough https://portnote.example.com.
Network traffic is routed trough Pi-hole that also runs on a Docker container together with Unbound. Both run at the local hosted selfhosted server Everything on my network resolves trough my DNS server. So for all my docker containers I've changed the file /etc/docker/daemon.json to set my DNS to Pi-hole. Also in my Asus router, my DNS server within LAN > DHCP server is setup to Pi-hole. My router still manages my DHCP though.
Within Pi-hole I have the following settings:
Local DNS
nginx.example.com > [local IP server]
CNAME records
pihole.example.com > nginx.example.com
portnote.example.com > nginx.example.com
[application].example.com > nginx.example.com
Nginx Proxy Manager is set up as follows:
pihole.example.com > [local IP server]:8080
portnote.example.com > [local IP server]:3123
[application].example.com > [local IP server]:[port number]
Everything works as expected and all my local addresses have aan SSL certificate, which is why I set it up this way. Also ads are blocked and my traffic is routed trough Unbound. What I notice though is that the clients displayed withing Pi-hole are mostly IP-addresses from their respective docker network. So for example: One of the clients is 192.168.192.2 which is the Docker container running Home Assistant. I would like to see the actual hostname instead of the IP-address. Is there any way to change these clients to show the real name?
Details about my system:
This is the docker compose file that I use to get my Pi-hole running:
services:
pihole:
container_name: pihole
image: "pihole/pihole:latest"
volumes:
- "/home/server/docker/pihole/etc/pihole:/etc/pihole"
environment:
- "TZ=[TimeZone]"
- "FTLCONF_dns_listeningMode=all"
- "FTL_CONF_dns_upstreams= 127.0.0.1#5335"
- "FTLCONF_webserver_port=8080o,[::]:8080o,8443os,[::]:8443os"
restart: unless-stopped
network_mode: host
cap_add:
- "SYS_TIME"
unbound:
container_name: unbound
image: "mvance/unbound:latest"
volumes:
- "/home/server/docker/unbound/opt/unbound/etc/unbound:/opt/unbound/etc/unbound"
- "/home/server/docker/unbound/opt/unbound/etc/unbound/unbound.conf:/opt/unbound/etc/unbound/unbound.conf"
restart: unless-stopped
network_mode: service:pihole
What I have changed since installing Pi-hole:
I have setup my DNS domain settings as "lan" and conditional forwarding is also setup for my lan network. This makes that my local devices such as my phone or pc are shown with their device name instead of their IP. But I think this wouldn't work with Docker since these networks are way wider.
Thanks in advance for you help