Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the ability to mark the traffic on the nebula interface for linux based systems. This allows the user to handle the nebula generated taffic via ip rules and using generic routing tables. For example, this allows the use of default routes via nebula for clients that already have a default gw set due to their network setup.
Current state:
0.0.0.0/0 routing is already possible in nebula using network namespaces (see https://www.wireguard.com/netns/) however I noticed in my own testing that moving network interfaces between namespaces can often introduce different new problems. E.g. you loose ip assignements on interfaces,
ip a
does not show your physical nic anymore resulting in problems with network managers on desktop style clients.Related issues / existing pull requests:
To enable 0.0.0.0/0 routing one would have to start nebula using
listen.so_mark
set to e.g. 4242 and then set the following ip rules / ip routes (taken from https://ro-che.info/articles/2021-02-27-linux-routing and the wg-quick project):This PR leaves the "final routing descision" to the user by adding only the abbitity to actually do it to nebula. This even enables setups with multiple 0.0.0.0/0 unsafe routes in the nebula config. Meaning one could add multiple 0.0.0.0/0 unsafe route endpoints and change which endpoint to actually use on the fly. You could also do something like source based routing to different gws at the same time.