routes enhancement: add custom routes to all peers or to a group of peers #185

Closed
opened 2025-11-20 05:07:37 -05:00 by saavagebueno · 3 comments
Owner

Originally created by @jeremyd on GitHub (Sep 10, 2022).

To route traffic from a group of peers toward a specific gateway. For example, in the use case of exit nodes where traffic crosses to the public internet, each peer that was a client of that exit node would need routes for the external addresses of the wireguard endpoints.

To accomplish this you could assign a custom route consisting of

ip route add <COTURN/NETBIRD MGMT/SIGNAL IP>/32 via <LOCAL NET GATEWAY> dev <INTERFACE>

so being able to specify the

  • ip range
  • gateway
  • interface

For a group of peers, or to all peers, this would accomplish the route distribution entirely via netbird!

Originally created by @jeremyd on GitHub (Sep 10, 2022). To route traffic from a group of peers toward a specific gateway. For example, in the use case of exit nodes where traffic crosses to the public internet, each peer that was a client of that exit node would need routes for the external addresses of the wireguard endpoints. To accomplish this you could assign a custom route consisting of ``` ip route add <COTURN/NETBIRD MGMT/SIGNAL IP>/32 via <LOCAL NET GATEWAY> dev <INTERFACE> ``` so being able to specify the * ip range * gateway * interface For a group of peers, or to all peers, this would accomplish the route distribution entirely via netbird!
Author
Owner

@mlsmaycon commented on GitHub (Sep 15, 2022):

Thanks for submitting this suggestion @jeremyd

Regarding the functionality it will need a few more adjustments to avoid forwarding peer connection traffic via the exit node and entering the chicken and egg paradox.

We are looking at a combination of FWMARK and IP RULE for that in Linux, we also want to avoid multiple rules and namespace so we don't loose easy visibility on what we are doing on the peer OS.

@mlsmaycon commented on GitHub (Sep 15, 2022): Thanks for submitting this suggestion @jeremyd Regarding the functionality it will need a few more adjustments to avoid forwarding peer connection traffic via the exit node and entering the chicken and egg paradox. We are looking at a combination of FWMARK and IP RULE for that in Linux, we also want to avoid multiple rules and namespace so we don't loose easy visibility on what we are doing on the peer OS.
Author
Owner

@jeremyd commented on GitHub (Sep 17, 2022):

Regarding the functionality it will need a few more adjustments to avoid forwarding peer connection traffic via the exit node and entering the chicken and egg paradox.

We are looking at a combination of FWMARK and IP RULE for that in Linux, we also want to avoid multiple rules and namespace so we don't loose easy visibility on what we are doing on the peer OS.

yes, perhaps with FWMARK and IP RULE the routes aren't the best option to use. Good point. I'm unsure if anyone would want custom routes in other cases besides exit nodes (or in combination with exit nodes). I really am looking forward to exit nodes!! :) Thank you.

@jeremyd commented on GitHub (Sep 17, 2022): > Regarding the functionality it will need a few more adjustments to avoid forwarding peer connection traffic via the exit node and entering the chicken and egg paradox. > > We are looking at a combination of FWMARK and IP RULE for that in Linux, we also want to avoid multiple rules and namespace so we don't loose easy visibility on what we are doing on the peer OS. yes, perhaps with FWMARK and IP RULE the routes aren't the best option to use. Good point. I'm unsure if anyone would want custom routes in other cases besides exit nodes (or in combination with exit nodes). I really am looking forward to exit nodes!! :) Thank you.
Author
Owner

@MohammedNoureldin commented on GitHub (Mar 17, 2024):

Hi @jeremyd,

I am a bit confused.

I am trying to get route all connections of my clients (Windows or Linux peers, for example) to a specific exit node. For this, probably I have to setup a routing peer on that node.

But how should the connections from the clients (peers) supposed to get redirected to that exit node (or accurately to the routing peer on that exit node)?

Should every client (peer) configure his gateway manually to match the IP address of the routing peer?

Or can this gateway adaption happen automatically by Netbird client?

@MohammedNoureldin commented on GitHub (Mar 17, 2024): Hi @jeremyd, I am a bit confused. I am trying to get route all connections of my clients (Windows or Linux peers, for example) to a specific exit node. For this, probably I have to setup a routing peer on that node. But how should the connections from the clients (peers) supposed to get redirected to that exit node (or accurately to the routing peer on that exit node)? Should every client (peer) configure his gateway manually to match the IP address of the routing peer? Or can this gateway adaption happen automatically by Netbird client?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#185