Skip to content
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

[26.1 backport] Forward DNS requests into --internal networks #47832

Merged
merged 1 commit into from
May 15, 2024

Conversation

vvoland
Copy link
Contributor

@vvoland vvoland commented May 14, 2024

- What I did

Fixes #47822

#47538 prevents containers only connected to --internal networks from communicating with external DNS servers - it also inadvertently prevents the daemon's internal DNS server from forwarding requests within an internal network to a containerised DNS server.

- How I did it

Relax the check, so that only requests that need to be forwarded from the host's network namespace are dropped.

External DNS servers remain unreachable from the internal network.

- How to verify it

New integration test.

- Description for the changelog

Fix a regression that prevented the use of DNS servers within a `--internal` network.

@vvoland vvoland added this to the 26.1.3 milestone May 14, 2024
@vvoland vvoland self-assigned this May 14, 2024
A recent change to prevent containers only connected to --internal
networks from communicating with external DNS servers inadvertently
prevented the daemon's internal DNS server from forwarding requests
within an internal network to a containerised DNS server.

Relax the check, so that only requests that need to be forwarded
from the host's network namespace are dropped.

External DNS servers remain unreachable from the internal network.

Signed-off-by: Rob Murray <rob.murray@docker.com>
(cherry picked from commit 77a47db)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@akerouanton akerouanton merged commit 8e96db1 into moby:26.1 May 15, 2024
132 checks passed
renovate bot added a commit to earthly/dind that referenced this pull request May 27, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [docker/docker](https://togithub.com/docker/docker) | patch | `26.1.2`
-> `26.1.3` |

---

### Release Notes

<details>
<summary>docker/docker (docker/docker)</summary>

### [`v26.1.3`](https://togithub.com/moby/moby/releases/tag/v26.1.3)

[Compare
Source](https://togithub.com/docker/docker/compare/v26.1.2...v26.1.3)

#### 26.1.3

For a full list of pull requests and changes in this release, refer to
the relevant GitHub milestones:

- [docker/cli, 26.1.3
milestone](https://togithub.com/docker/cli/issues?q=is%3Aclosed+milestone%3A26.1.3)
- [moby/moby, 26.1.3
milestone](https://togithub.com/moby/moby/issues?q=is%3Aclosed+milestone%3A26.1.3)
- Deprecated and removed features, see [Deprecated
Features](https://togithub.com/docker/cli/blob/v26.1.3/docs/deprecated.md).
- Changes to the Engine API, see [API version
history](https://togithub.com/moby/moby/blob/v26.1.3/docs/api/version-history.md).

##### Bug fixes and enhancements

- Fix a regression that prevented the use of DNS servers within a
`--internal` network.
[moby/moby#47832](https://togithub.com/moby/moby/pull/47832)
- When the internal DNS server's own address is supplied as an external
server address, ignore it to avoid unproductive recursion.
[moby/moby#47833](https://togithub.com/moby/moby/pull/47833)

##### Packaging updates

- Allow runc to kill containers when confined to the runc profile in
AppArmor version 4.0.0 and later.
[moby/moby#47829](https://togithub.com/moby/moby/pull/47829)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6am on monday" (UTC), Automerge
- At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/earthly/dind).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZSJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added a commit to earthly/dind that referenced this pull request May 27, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [docker/docker](https://togithub.com/docker/docker) | patch | `26.1.2`
-> `26.1.3` |

---

### Release Notes

<details>
<summary>docker/docker (docker/docker)</summary>

### [`v26.1.3`](https://togithub.com/moby/moby/releases/tag/v26.1.3)

[Compare
Source](https://togithub.com/docker/docker/compare/v26.1.2...v26.1.3)

#### 26.1.3

For a full list of pull requests and changes in this release, refer to
the relevant GitHub milestones:

- [docker/cli, 26.1.3
milestone](https://togithub.com/docker/cli/issues?q=is%3Aclosed+milestone%3A26.1.3)
- [moby/moby, 26.1.3
milestone](https://togithub.com/moby/moby/issues?q=is%3Aclosed+milestone%3A26.1.3)
- Deprecated and removed features, see [Deprecated
Features](https://togithub.com/docker/cli/blob/v26.1.3/docs/deprecated.md).
- Changes to the Engine API, see [API version
history](https://togithub.com/moby/moby/blob/v26.1.3/docs/api/version-history.md).

##### Bug fixes and enhancements

- Fix a regression that prevented the use of DNS servers within a
`--internal` network.
[moby/moby#47832](https://togithub.com/moby/moby/pull/47832)
- When the internal DNS server's own address is supplied as an external
server address, ignore it to avoid unproductive recursion.
[moby/moby#47833](https://togithub.com/moby/moby/pull/47833)

##### Packaging updates

- Allow runc to kill containers when confined to the runc profile in
AppArmor version 4.0.0 and later.
[moby/moby#47829](https://togithub.com/moby/moby/pull/47829)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6am on monday" (UTC), Automerge
- At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/earthly/dind).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZSJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants