# Host.docker.internal not resolving correctly

**URL:** <https://forums.docker.com/t/host-docker-internal-not-resolving-correctly/137980>\
**Category:** Docker Desktop\
**Tags:** macos\
**Created:** [October 5, 2023, 5:38pm UTC](https://forums.docker.com/t/host-docker-internal-not-resolving-correctly/137980 "2023-10-05T17:38:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![njonesdotwork](https://avatars.discourse-cdn.com/v4/letter/n/d2c977/32.png) [@njonesdotwork](https://forums.docker.com/u/njonesdotwork)\
**Post date:** [October 5, 2023, 5:38pm UTC](https://forums.docker.com/t/host-docker-internal-not-resolving-correctly/137980/1 "2023-10-05T17:38:04Z")

</div>

As of v 4.23, our usage of ${DOCKER\_HOST\_GATEWAY:host.docker.internal} is broken. We are using this in a docker-compose file in order to whitelist the host machine with one of the containers (dgraph, if it matters.)

You can tell from the container’s logs, that `192.168.65.254` is being provided as the IP address of host.docker.internal. But when the host machine is actually trying to access the container, it is being reported as `192.168.65.1`

This happens on 4.23 and 4.24. If I rollback to 4.22, everything works as it has for the past 9 months or so.

Has something changed? I see in the 4.23 release notes that the mac networking was reworked, did something break or is something else required now?

This forum is not an official product support or issue reporting channel.

---

<div class="post-metadata">

**Author:** ![njonesdotwork](https://avatars.discourse-cdn.com/v4/letter/n/d2c977/32.png) [@njonesdotwork](https://forums.docker.com/u/njonesdotwork)\
**Post date:** [October 29, 2023, 3:10pm UTC](https://forums.docker.com/t/host-docker-internal-not-resolving-correctly/137980/2 "2023-10-29T15:10:17Z")

</div>

This is still happening as of 4.25.0 (also checked on 4.24.2…) Can anyone else confirm for me that they are _not_ seeing this behavior? I can’t find any mention of needing to change anything from 4.23 onward but the release notes claiming the that the mac networking was reworked makes me suspicious.

To restate… `host.docker.internal` is getting resolved as `192.168.65.254` at container startup (which is being used for a whitelist) but when I use the localhost to access a container at runtime, it is coming through `192.168.65.1` and is therefore getting blocked.

Rolling back to 4.22 completely resolves the problem.
