Sous-domaine non accéssible avec Pi-Hole

Bonjour à tous,
J’ai un petit problème d’accès à un sous-domaine depuis que j’ai installé Pi-Hole sur mon Raspberry Pi.

Lorsque j’essaye d’accéder a mon sous-domaine.domaine.tld depuis mon réseau local c’est impossible. Mon domaine.tld est lui parfaitement accéssible.

Depuis un réseau extérieur, je peux accéder à mon sous-domaine, mais si j’utilise l’adresse IP du Pi-Hole comme résolveur DNS sur le réseau extérieur je ne peux plus accéder a mon sous-domaine non plus.
J’ai essayé d’utiliser le DHCP du Pi-Hole mais cela n’a rien arrangé malheureusement.

J’aimerais résoudre ce problème mais je ne sais pas vraiment comment. Est-ce que quelqu’un rencontre le même problème ? Ou peut-être que quelqu’un aurait une piste.


[English]

Good morning, everyone,
I have a small problem accessing a subdomain since I installed Pi-Hole on my Raspberry Pi.

When I try to access my subdomain.domain.tld from my local network it’s impossible. My domain.tld is perfectly accessible.

From an external network, I can access my subdomain, but if I use the IP address of the Pi-Hole as a DNS resolver on the external network, I can no longer access my subdomain either.
I tried to use the DHCP of the Pi-Hole but unfortunately it didn’t help.

I would like to solve this problem but I don’t really know how. Does anyone have the same problem? Or maybe someone has a lead.

Are you sure of the IP linked to this domain in your /etc/hosts ?
Pi-Hole (via dnsmasq) uses this file to resolve any domain name before asking to the distant DNS resolver.

1 Like

@Maniack_Crudelis

Wow, you’re awesome!
you solve all my problems: D

Thank you very much.
I have associated my external IP with my subdomain in the /etc/hosts file and it works fine now. Thank you again for your precious help.

/etc/hosts
xxx.xxx.xxx.xxx subdomain.domain.tld