Subnet mapping access. #2238

Open
opened 2025-11-20 07:06:21 -05:00 by saavagebueno · 4 comments
Owner

Originally created by @Frankzhang854 on GitHub (Sep 1, 2025).

When NetBird is running on Linux, other devices cannot access other devices inside the LAN using LAN IPs through this Linux device (even though I have already set subnet mapping in the console), unless I execute code like the following on Linux:
···
iptables -I FORWARD -i eth0 -j ACCEPT
iptables -I FORWARD -o eth0 -j ACCEPT
iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
iptables -I FORWARD -i wg0 -j ACCEPT
iptables -I FORWARD -o wg0 -j ACCEPT
iptables -t nat -I POSTROUTING -o wg0 -j MASQUERADE
···
Only then can they be accessed.
I would like to ask: is it possible to add this code during the software installation, so that I don’t need to set it manually?

Originally created by @Frankzhang854 on GitHub (Sep 1, 2025). When NetBird is running on Linux, other devices cannot access other devices inside the LAN using LAN IPs through this Linux device (even though I have already set subnet mapping in the console), unless I execute code like the following on Linux: ··· iptables -I FORWARD -i eth0 -j ACCEPT iptables -I FORWARD -o eth0 -j ACCEPT iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE iptables -I FORWARD -i wg0 -j ACCEPT iptables -I FORWARD -o wg0 -j ACCEPT iptables -t nat -I POSTROUTING -o wg0 -j MASQUERADE ··· Only then can they be accessed. I would like to ask: is it possible to add this code during the software installation, so that I don’t need to set it manually?
saavagebueno added the triage-needed label 2025-11-20 07:06:21 -05:00
Author
Owner

@1nerdyguy commented on GitHub (Sep 2, 2025):

Do you have masguarading on?

@1nerdyguy commented on GitHub (Sep 2, 2025): Do you have masguarading on?
Author
Owner

@Frankzhang854 commented on GitHub (Sep 2, 2025):

Do you have masguarading on?

I haven't turned it on. Could you please tell me how to enable it? Thank you!

@Frankzhang854 commented on GitHub (Sep 2, 2025): > Do you have masguarading on? I haven't turned it on. Could you please tell me how to enable it? Thank you!
Author
Owner

@nazarewk commented on GitHub (Sep 3, 2025):

I think you might be having some form of misconfiguration on the organization (such as advertising LAN subnet range to the Peer inside that network).
Is it Cloud or self-hosted? Could you post a debug bundle key from netbird debug for 1m -U? I could check your config on the Cloud.

@nazarewk commented on GitHub (Sep 3, 2025): I think you might be having some form of misconfiguration on the organization (such as advertising LAN subnet range to the Peer inside that network). Is it Cloud or self-hosted? Could you post a debug bundle key from `netbird debug for 1m -U`? I could check your config on the Cloud.
Author
Owner

@1nerdyguy commented on GitHub (Sep 3, 2025):

Do you have masguarading on?

I haven't turned it on. Could you please tell me how to enable it? Thank you!

Under the network, where you set the routing peer, there is a 'masquerade' toggle.

What this does is when a client sends traffic to the intended subnet, the routing peer sends it from it's own local IP address vs the client's ip. This way, no need to change any routing on the LAN network side, as the exit node already has access.

@1nerdyguy commented on GitHub (Sep 3, 2025): > > Do you have masguarading on? > > I haven't turned it on. Could you please tell me how to enable it? Thank you! Under the network, where you set the routing peer, there is a 'masquerade' toggle. What this does is when a client sends traffic to the intended subnet, the routing peer sends it from it's own local IP address vs the client's ip. This way, no need to change any routing on the LAN network side, as the exit node already has access.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2238