Add a network in allowed ips, but do not add route for it #2047

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

Originally created by @ZnqbuZ on GitHub (Jul 5, 2025).

Is your feature request related to a problem? Please describe.
Need to set up conditional route on a gateway connected with NetBird. Only traffic from some machines should be route to NetBird.

Describe the solution you'd like
Just add an option for each network to disable automatically route adding.
And add a global option to totally disable route modifications.

Describe alternatives you've considered
Manually remove table netbird

Originally created by @ZnqbuZ on GitHub (Jul 5, 2025). **Is your feature request related to a problem? Please describe.** Need to set up conditional route on a gateway connected with NetBird. Only traffic from some machines should be route to NetBird. **Describe the solution you'd like** Just add an option for each network to disable automatically route adding. And add a global option to totally disable route modifications. **Describe alternatives you've considered** Manually remove table netbird
saavagebueno added the feature-requestclientnetworking labels 2025-11-20 06:11:52 -05:00
Author
Owner

@ZnqbuZ commented on GitHub (Jul 5, 2025):

Probably related https://github.com/netbirdio/netbird/issues/3984

@ZnqbuZ commented on GitHub (Jul 5, 2025): Probably related https://github.com/netbirdio/netbird/issues/3984
Author
Owner

@nazarewk commented on GitHub (Jul 7, 2025):

I am not sure I follow, could you elaborate?

What kind of routes are we talking about? Network Resource or Network Route? How do you have it configured?

If I understand it correctly, creating a Network Resource at GroupA, then creating a Policy giving access from GroupB to GroupA and then assigning GroupB to a single Peer would only allow that Peer to access the configured Resource.

@nazarewk commented on GitHub (Jul 7, 2025): I am not sure I follow, could you elaborate? What kind of routes are we talking about? Network Resource or Network Route? How do you have it configured? If I understand it correctly, creating a Network Resource at `GroupA`, then creating a Policy giving access from `GroupB` to `GroupA` and then assigning `GroupB` to a single Peer would only allow that Peer to access the configured Resource.
Author
Owner

@ZnqbuZ commented on GitHub (Jul 8, 2025):

It's the route table on the gateway machine. In brief, I want a Table=off or Table = <Some Table>, see this

To be precise, I want an option like "Add route to machines or not" when I choose the distribution group. For example, say that I have 2 nodes A and B in netbird, (where A is the gateway I mentioned,) and I let B to be an exit node of A. Then on A, I can see that 0.0.0.0/0 is in AllowedIPs of <B>, and ip route show tables all & ip rule show indicates that I have a route equivalent to default via <B>. Now I want netbird not to add this default route: imagine that I have a container C on A and I want A to route traffic from C to B, but not to route traffic from itself to B.

Image
@ZnqbuZ commented on GitHub (Jul 8, 2025): It's the route table on the gateway machine. In brief, I want a `Table=off` or `Table = <Some Table>`, see [this](https://github.com/pirate/wireguard-docs?tab=readme-ov-file#Table) To be precise, I want an option like "Add route to machines or not" when I choose the distribution group. For example, say that I have 2 nodes `A` and `B` in netbird, (where `A` is the gateway I mentioned,) and I let `B` to be an exit node of `A`. Then on `A`, I can see that `0.0.0.0/0` is in `AllowedIPs` of `<B>`, and `ip route show tables all` & `ip rule show` indicates that I have a route equivalent to `default via <B>`. Now I want netbird not to add this default route: imagine that I have a container `C` on `A` and I want `A` to route traffic from `C` to `B`, but not to route traffic from itself to `B`. <img width="1237" height="258" alt="Image" src="https://github.com/user-attachments/assets/06f8c78a-5082-457e-9acf-5c8039a0fc14" />
Author
Owner

@QuantumCorral commented on GitHub (Nov 9, 2025):

+1

@QuantumCorral commented on GitHub (Nov 9, 2025): +1
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2047