Drop actor UDP egress to every port but DNS - #1623
Open
haiyanmeng wants to merge 1 commit into
Open
Conversation
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
requested review from
Benjamin Elder (BenTheElder) and
Bowei Du (bowei)
September 11, 2026 21:50
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.