Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jeremyd opened this issue Sep 10, 2022 · 3 comments
Closed

Comments

@jeremyd
Copy link

jeremyd commented 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!

@mlsmaycon
Copy link
Collaborator

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.

@jeremyd
Copy link
Author

jeremyd commented 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.

@MohammedNoureldin
Copy link

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants