Skip to content

fix:ファイアウォールが上流 DNS への問い合わせを遮断する問題を修正 - #4279

Merged
KATO-Hiro merged 3 commits into
stagingfrom
fix/devcontainer-upstream-dns
Nov 2, 2026
Merged

KATO-Hiro merged 3 commits into
stagingfrom
fix/devcontainer-upstream-dns

Conversation

@river0525

@river0525 river0525 commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • バグ修正
    • 設定から読み込んだ、数字とピリオドのみで構成されるDNSサーバー宛ての通信(UDP/TCP、ポート53)が許可されるようになりました。
    • DNSサーバーの設定がない場合や形式が対象外の場合も、ファイアウォールの設定を続行します。
    • Docker埋め込みDNSへの通信は引き続き利用でき、任意の宛先へのDNS通信は許可されません。

@river0525
river0525 requested review from KATO-Hiro and a balanced review from Copilot November 2, 2026 09:37
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 805c97c and 0ef0d96.

Files selected for processing: 1
  • .devcontainer/init-firewall.sh

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

/etc/resolv.conf の ExtServers コメントから DNS アドレスを読み込みます。値が数字とピリオドのみで構成される場合、その宛先への UDP/TCP 53 番ポートを許可します。埋め込み DNS 127.0.0.11 の許可ルールは維持します。

Changes: DNS ファイアウォール設定

Layer / File(s) Summary
上流 DNS の許可ルール
.devcontainer/init-firewall.sh
ExtServers から読み取った値が数字とピリオドのみで構成される場合、その宛先への UDP/TCP 53 番ポートの許可ルールを追加します。それ以外の値はスキップします。埋め込み DNS 127.0.0.11 の許可ルールは維持します。

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: Minimal · up to b89f0

Existing DNS failures may persist on older Docker versions or during firewall reinitialization, but this change does not make them worse.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed タイトルは、上流 DNS への問い合わせをファイアウォールが遮断する問題の修正を明確に示しています。変更内容の主目的と一致しています。
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Fix comments: Fix CodeRabbit comments on this PR

Comment thread .devcontainer/init-firewall.sh Resolved
KATO-Hiro and others added 2 commits November 2, 2026 12:41
Docker queries bare ExtServers addresses from the container's namespace and host(...) ones from the host's, so the strict validation blocked legitimate upstream DNS.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@KATO-Hiro KATO-Hiro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正していただき、ありがとうございます

前段の検証は使用されていない可能性が高いと判断し、削除しました
ご了承ください

LGTM です
マージします

@KATO-Hiro
KATO-Hiro merged commit 09c78b4 into staging Nov 2, 2026
6 checks passed
@KATO-Hiro
KATO-Hiro deleted the fix/devcontainer-upstream-dns branch November 2, 2026 12:53

This branch was successfully deployed

1 active deployment
preview — b89f060c Deployed Nov 2, 2026 by KATO-Hiro via preview #9203
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants