Uptime-kuma & Docker: Timeouts when monitoring services on same host

Outcide@lemmy.world to Selfhosted@lemmy.world – 9 points –

Hello.

Pretty sure I'm doing something stupid, but I can't find it.

I have Caddy and Uptime-kuma installed as Docker containers. They are on the same Docker bridge network. Both work fine (with the below exception).

I'm trying to monitor Caddy virtual hosts from Uptime-kuma and getting a timeout.

If I exec into the Uptime-kuma container, I can ping the host name I want to monitor (and the DNS is resolving correctly to the Docker hosts external IP).

But I can't reach port 80/443 using telnet or openssl.

Any suggestions for what I might be doing wrong?

Thanks!

9

You are viewing a single comment

Are you hosting behind NAT / at home? If so, you may need to enable NAT reflection on your router.

I am behind cgnat but why would that matter for trying to reach a service on the same box?

It matters only if "the docker hosts external IP" your dns resolves is a public IP. In that case packets travel to the router which needs to map/send them back to the docker hosts LAN IP (NAT-Reflection). With cgnat this would need to be enabled on the carrier side, where you set up the port forwarding. If that's not possible, split-DNS may be an alternative.

If "the docker hosts external IP" is actually your docker hosts LAN IP, all of that is irrelevant. Split-DNS would accomplish that.

Sorry I'm being stupid. I'm on CGNAT at home but this is actually on a VPS.