Limit aproxy nftables redirection to egress traffic only - #807
Merged
Conversation
weiiwang01
requested review from
cbartz,
florentianayuwono,
javierdelapuente,
yanksyoon and
yhaliaw
as code owners
July 14, 2026 04:50
florentianayuwono
approved these changes
Jul 14, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the OpenStack runner cloud-init template to scope aproxy’s transparent-proxy nftables DNAT rules to traffic that will egress via the runner’s default-route interface(s), reducing the need to exclude broad private IP ranges and avoiding local/overlay traffic being captured.
Changes:
- Add default-route interface filtering to aproxy nftables
preroutingandoutputchains. - Update unit-test expected nftables snippets to match the new rules.
- Bump
github-runner-managerversion and document the user-facing change indocs/changelog.md.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
github-runner-manager/src/github_runner_manager/templates/openstack-userdata.sh.j2 |
Adds default-route NIC detection and applies interface-based filtering to aproxy nftables redirection. |
github-runner-manager/tests/unit/openstack_cloud/test_openstack_runner_manager.py |
Updates expected nftables rules in unit tests to match the new template output. |
github-runner-manager/pyproject.toml |
Version bump from 0.18.2 to 0.18.3. |
docs/changelog.md |
Adds a 2026-07-14 entry describing the aproxy redirection behavior change. |
cbartz
approved these changes
Jul 14, 2026
yhaliaw
approved these changes
Jul 15, 2026
yhaliaw
left a comment
Collaborator
There was a problem hiding this comment.
Approved
🤝 Human review with AI assistance.
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.
What this PR does
Update the aproxy transparent proxy nftables rules so they only redirect traffic leaving the runner's default-route ("physical") interfaces.
Why we need it
This can simplify the
aproxy-exclude-addressesconfiguration, as we don't need to include the private IP ranges by default, and we only need to include the actual IP addresses that we need to exclude. Also, this would help reduce the chances of IP range conflicts between internal services, like MicroK8s, Docker, and LXD, and external services within the infrastructure using private IP addresses.Checklist
docs/changelog.mdwith user-relevant changesterraform fmtpasses andtflintreports no errorsgithub-runner-manager/pyproject.toml.