-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wider-world-to-container doesn't apply to traffic coming from within a container #277
Comments
278: Change behaviour of `external_network_interfaces` r=pitkley a=pitkley Previously if you defined the `global_defaults.external_network_interfaces` configuration key, the first interface provided would internally be used to restrict which interfaces traffic can ingress into your containers from, even if `wider_world_to_container.rules[].external_network_interfaces` was not defined. This version changes the behaviour such that `global_defaults.external_network_interfaces` is no longer used to determine if traffic can ingress or not. If you want to restrict traffic from reaching your containers to specific interfaces, use the `wider_world_to_container.rules[].external_network_interfaces` configuration key instead. Closes #277. Co-authored-by: Pit Kleyersburg <[email protected]>
278: Change behaviour of `external_network_interfaces` r=pitkley a=pitkley Previously if you defined the `global_defaults.external_network_interfaces` configuration key, the first interface provided would internally be used to restrict which interfaces traffic can ingress into your containers from, even if `wider_world_to_container.rules[].external_network_interfaces` was not defined. This version changes the behaviour such that `global_defaults.external_network_interfaces` is no longer used to determine if traffic can ingress or not. If you want to restrict traffic from reaching your containers to specific interfaces, use the `wider_world_to_container.rules[].external_network_interfaces` configuration key instead. Closes #277. Co-authored-by: Pit Kleyersburg <[email protected]>
@cybermcm I just released 1.2.0-rc.5 (which you'll be able to retrieve via Docker Hub under If your issue isn't fixed, please feel free to reopen this ticket! |
@pitkley Thanks for this version but it breaks Docker internal DNS (at least for me) |
@cybermcm hm, while I can't directly confirm the DNS-issue, I can see that outgoing traffic overall seems to be a bit wonky. Sorry that I didn't catch that. I'll reopen this issue and look at it again. 👍 Thanks so much for all your testing efforts! |
@cybermcm just for your information: I have reverted the change and created (I'm planning to release v1.2.0 proper some time this week, potentially today.) I have postponed this issue into v1.3.0 and I'm looking into how this could be handled. Some background, both for myself and in case anyone is interested: DFW decides how/when to route traffic based on the port requested and on the interface the traffic is arriving from. If the interface is not specified (which is what This circumstance makes it tough to decide if a packet for a specific port is targeting "us" or the outside world. My current idea is to allow the user to specify (or auto-determine) the IP-addresses traffic can ingress on and filtering on that, but I'm still exploring if there is maybe some metadata on a packet that can filtered on. |
Note: iptables can match This could be the type of match we need. |
Scenario:
Create a container providing some service under a non-published port, e.g. with the following
docker-compose.yml
:Start the service using
docker-compose --project-name whoami up -d
.Add the following to your WWTC-configuration:
Signal DFW to reapply the rules (e.g. by restarting it).
Try to cURL the above container from within another container on the same host:
Since the container is exposed to the wider-world, I'd expect the container to also be reachable from other containers.
(Thanks to @cybermcm for reporting this.)
The text was updated successfully, but these errors were encountered: