Skip to content

Conversation

@rmvangun
Copy link
Contributor

@rmvangun rmvangun commented Aug 4, 2025

In docker v28, a security enhancement was introduced that drops packets coming from a non-host source. Version v0.8.2 of Colima upgrades to v28. This breaks the mechanism through which traffic gets routed from the MacOS host when using Colima. This PR fixes by adding "com.docker.network.bridge.gateway_mode_ipv4": "nat-unprotected" to the docker network options, which is permissable in a local dev environment.

In docker v28, a security hardening feature broke Windsor's ability to route traffic through the VM to the containers. The feature drops packets originating from a non-host. Since we intend for packets to originate from the host interface, we can add this as trusted using new Docker network options in the docker-compose config.

The solution is to add:

```
driver_opts:
  com.docker.network.bridge.trusted_host_interfaces: "col0"
```

When the running docker engine is >= v28 and we're using Colima.

Security hardening outlined in https://www.docker.com/blog/docker-engine-28-hardening-container-networking-by-default/
In docker v28, a security enhancement was introduced that drops packets coming from a non-host source. This breaks the mechanism through which traffic gets routed from the MacOS host when using Colima. This PR fixes by adding `"com.docker.network.bridge.gateway_mode_ipv4": "nat-unprotected"` to the docker network options, which is permissable in a local dev environment.
@rmvangun rmvangun added the bug Something isn't working label Aug 4, 2025
@rmvangun rmvangun merged commit 9c5d48d into main Aug 4, 2025
12 of 13 checks passed
@rmvangun rmvangun deleted the fix/docker-hardening-exception branch August 4, 2025 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants