Repository navigation
Drop actor UDP egress to every port but DNS - #1623
Merged
Bowei Du (bowei) merged 1 commit intoSep 14, 2026
Merged
Conversation
haiyanmeng
requested review from
Benjamin Elder (BenTheElder) and
Bowei Du (bowei)
September 11, 2026 21:50
Bowei Du (bowei)
left a comment
Collaborator
There was a problem hiding this comment.
Looks ok
Seems like we are exporting things we don't need to, can you check?
Only TCP is redirected into atunnel, so UDP left the worker pod through the compatibility masquerade with no CONNECT authority, no access log, and no policy hook. QUIC on 443 is the case that matters: an actor could make its own HTTPS egress unintercepted just by speaking HTTP/3, with no timing trick needed. Add a forward-chain rule ahead of the catch-all accept that drops UDP from the actor veth to any destination port but 53, keeping the DNS exception the masquerade exists for. The rule counts what it drops, so a workload that legitimately needs UDP surfaces in `nft list table ip ateom_actor` rather than as an unexplained timeout. The rule is installed whether or not an egress gateway is configured: unlike the redirect it needs nothing to redirect to, and a deployment with no egress control is where unrestricted UDP is worst. The existing TODO narrows rather than goes away. The DNS exception is still any port-53 destination rather than the configured cluster resolver, and protocols other than TCP and UDP still reach the masquerade.
haiyanmeng
force-pushed
the
block-non-dns-udp
branch
from
September 14, 2026 15:10
f6e83d8 to
8377adc
Compare
Bowei Du (bowei)
approved these changes
Sep 14, 2026
Collaborator
|
I think we need an e2e test for this. |
Collaborator
Author
Let me add it in a followup PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Only TCP is redirected into atunnel, so UDP left the worker pod through the compatibility masquerade with no CONNECT authority, no access log, and no policy hook. QUIC on 443 is the case that matters: an actor could make its own HTTPS egress unintercepted just by speaking HTTP/3, with no timing trick needed.
Add a forward-chain rule ahead of the catch-all accept that drops UDP from the actor veth to any destination port but 53, keeping the DNS exception the masquerade exists for. The rule counts what it drops, so a workload that legitimately needs UDP surfaces in
nft list table ip ateom_actorrather than as an unexplained timeout.The rule is installed whether or not an egress gateway is configured: unlike the redirect it needs nothing to redirect to, and a deployment with no egress control is where unrestricted UDP is worst.
The existing TODO narrows rather than goes away. The DNS exception is still any port-53 destination rather than the configured cluster resolver, and protocols other than TCP and UDP still reach the masquerade.