Internal DNS not forwarding to correct port #4489
Replies: 1 comment
|
DNS is only resolving the hostname to an IP address; it does not contain or select a port number. For example, if: and you open: the browser connects to: For HTTPS it would use port 443. That explains why you're reaching the Pi-hole UI if Pi-hole currently owns port 80 on that IP. DNS can resolve the correct Docker host IP, but it cannot tell the browser to use port 3000, 8080, etc. The normal reverse-proxy setup is: If NPM and the target container share a Docker network, NPM can forward directly using Docker DNS, for example: You don't need to publish port 8080 to the host for that path. The important part is that NPM must receive the connection on port 80/443. If Pi-hole and NPM are on the same host IP, they cannot both independently own the same host port. So either give NPM ports 80/443, give Pi-hole's web interface another IP/port, or proxy the Pi-hole UI through NPM as another hostname. |
Uh oh!
There was an error while loading. Please reload this page.
I have all of my containers running on a docker network. They are on the same network that is running NPM. All the other containers are running on different ports with the same IP address obviously. When I get DNS through cloudflare for my external services they resolve fine. Internal services are all resolving back to port 80 and (which is running the pihole server ui and dont forward. I have everything set to forward to the correct port and I have validated that DNS is indeed resolving to the correct IP (of the docker server) and resolves. Am I missing something?
All reactions