[GH-ISSUE #5853] Subject: NetBird + iptables setup – source IP not preserved (Windows server / game servers) #12174

Open
opened 2026-08-05 01:32:35 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @Crushedice on GitHub (Apr 11, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5853

Greetings,
I’m reaching out as a last attempt to get this working — I’d really appreciate any help or ideas.

My current setup is a self-hosted NetBird stack running on a VPS with two public IP addresses. I also have a local Windows server connected via a NetBird client.

On the VPS, I configured iptables so that one of the public IPs is dedicated to the Windows server. Additionally, I created a group (Windows server + VPS) and set the VPS as the exit node.

So far, this works in terms of routing — any request to xxx.xxx.xxx.235 is successfully forwarded to the Windows server.

The problem:
The Windows server only sees the VPS NetBird IP as the source of incoming connections. The original client IP is not preserved — it gets masqueraded by the VPS.

This becomes a major issue because I’m running game servers on the Windows machine. With all players appearing under the same IP, things like player identification, rate limiting, and bans simply don’t work.

I’ve already tried multiple approaches (including suggestions from several AI tools), such as modifying packet marks, removing masquerade rules, and other iptables adjustments — but none of them worked, and some even broke the setup.

At this point, I’m looking for any ideas or guidance on how to preserve the original source IP when forwarding traffic through the VPS to the Windows server.

Thanks in advance for any help.

– Crushed

Originally created by @Crushedice on GitHub (Apr 11, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5853 Greetings, I’m reaching out as a last attempt to get this working — I’d really appreciate any help or ideas. My current setup is a self-hosted NetBird stack running on a VPS with two public IP addresses. I also have a local Windows server connected via a NetBird client. On the VPS, I configured iptables so that one of the public IPs is dedicated to the Windows server. Additionally, I created a group (Windows server + VPS) and set the VPS as the exit node. So far, this works in terms of routing — any request to xxx.xxx.xxx.235 is successfully forwarded to the Windows server. The problem: The Windows server only sees the VPS NetBird IP as the source of incoming connections. The original client IP is not preserved — it gets masqueraded by the VPS. This becomes a major issue because I’m running game servers on the Windows machine. With all players appearing under the same IP, things like player identification, rate limiting, and bans simply don’t work. I’ve already tried multiple approaches (including suggestions from several AI tools), such as modifying packet marks, removing masquerade rules, and other iptables adjustments — but none of them worked, and some even broke the setup. At this point, I’m looking for any ideas or guidance on how to preserve the original source IP when forwarding traffic through the VPS to the Windows server. Thanks in advance for any help. – Crushed
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#12174