mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8046] [MERGED] fix(server): stop treating CGNAT as a trusted private network #8073
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#8073
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8046
Author: @Gunterlie
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @Gunterlie
Base:
staging← Head:fix/private-network-no-cgnat📝 Commits (3)
8e01e43fix(server): stop treating CGNAT as a trusted private network7d64f44docs: say TRUSTED_PRIVATE_NETWORKS replaces the default ranges795048dtest(server): pin CGNAT as non-routable after leaving the private-network list📊 Changes
6 files changed (+20 additions, -11 deletions)
View changed files
📝
docs/CONFIGURATION.md(+1 -1)📝
docs/REMOTE_ACCESS.md(+2 -2)📝
packages/server/src/config/runtime-config.ts(+1 -1)📝
packages/server/src/middleware/csrf-protection.ts(+2 -2)📝
packages/server/src/middleware/ip-allowlist.ts(+5 -4)📝
scripts/regressions/access-policy.regression.ts(+9 -1)📄 Description
Why
ALLOW_UNAUTHENTICATED_PRIVATE_NETWORK=truealso trusted100.64.0.0/10(carrier-grade NAT). Some internet providers hand out addresses from this range, so a host with such an address would skip the login for unrelated customers of that provider. This hardens the default: Tailscale keeps its own trust rule (real Tailscale interface check,BYPASS_AUTH_TAILSCALE), so CGNAT does not need to be in the private-network list.What changed
100.64.0.0/10fromDEFAULT_PRIVATE_NETWORK_CIDRS(ip-allowlist.ts), soisPrivateNetworkIpand the access policy no longer trust it.100.64.0.0/10inTRUSTED_PRIVATE_NETWORKS(documented indocs/CONFIGURATION.mdanddocs/REMOTE_ACCESS.md).access-policy.regression.ts: a100.64.x.xpeer needs a login with the flag on, a192.168.x.xpeer does not, andTRUSTED_PRIVATE_NETWORKS=100.64.0.0/10restores it. It fails onstagingwithout the fix.Validation
access-,docker-proxy,loopback-proxyregressions: pass.pnpm check: exit 0.Manual verification
100.64.x.xnon-Tailscale peer is asked to log in with the flag on.192.168.x.x) still skips the login with the flag on.Notes
docs/REMOTE_ACCESS.md(translated packs on thedocs-i18nbranch).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.