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

How to configure Nebula's full tunnel mode #307

Closed
Ops-online opened this issue Sep 29, 2020 · 10 comments
Closed

How to configure Nebula's full tunnel mode #307

Ops-online opened this issue Sep 29, 2020 · 10 comments

Comments

@Ops-online
Copy link

Ops-online commented Sep 29, 2020

image

Network topology description

  1. Nebula node 1,2 and non-Nebula node A,B is behind the nat network;
  2. The gateway of non-Nebula node A is Nebula node 1;
  3. The gateway of non-Nebula node B is Nebula node 2;

How to configure Nebula's full tunnel mode so that non-nebulas nodes behind one nebula node can access the Internet through another nebula node

The Nebula node uses centos7.

Thanks.

@jradxl
Copy link

jradxl commented Oct 1, 2020

I'd love to know the answer to this too!
Not tried it yet, and had assumed a route on non-Nebula node X would suffice. But I guess you've tried that!
(Nice diagram, how did you draw it?)

@actronzs
Copy link

me too ;-)

@Mrc527
Copy link

Mrc527 commented Nov 19, 2020

Hello guys,

I tried to add a certificate with subnet 0.0.0.0/0 and then adding to the config of the client the following:
- route: 0.0.0.0/0
via: 192.168.xxx.xxx

Unfortunately the route is not getting created on my client.
If I put any other subnet, even a /8, it works perfectly.

Do you see any reason why this should not work?

Once this works, I think setting up the configuration shown in the picture is trivial

@ghost
Copy link

ghost commented Apr 19, 2021

+1
I believe other network solutions call these endpoints exit nodes

@mrbluecoat
Copy link

Would unsafe_routes work for this use case?
#214 (comment)

@mrbluecoat
Copy link

ref #280

@higgssinglet
Copy link

Love to see this implemented for I like to use this when traveling

@johnmaguire
Copy link
Collaborator

While Nebula still does not currently aim to support full tunneling, I wanted to share some information from the NebulaOSS community Slack that may be valuable to others discovering this issue:

Regarding unsafe_routes, @brad-defined writes:

unsafe routes works basically for RFC 1918 space, so you can use larger CIDR ranges [than a /32].
Nebula registers a route to the Nebula TUN device for all traffic that needs to transport through Nebula, and it also sends that traffic in UDP packets to peers (which could be on the LAN or on the internet.)
If you register a 0.0.0.0/0 unsafe route in a Nebula client, then it'll register a route on the box to send all IPv4 traffic to the Nebula TUN device. So, when Nebula tries to send UDP traffic to some peer on the internet, that UDP packet gets locally routed back to the Nebula TUN device.
there may be things we could try to get a full tunnel to work, but the product doesn't target that use case today.
you can specify non-RFC 1918 CIDR blocks for unsafe routes, and that will work, too, as long as there are no Nebula peers running in that CIDR (meaning, Nebula doesn't need to send any UDP packets to that address space.)

Community user Claudio notes:

I have had some success with having run nebula in its own network namespace on a Linux system (ip netns), move the external interface to the internet in there and then move the nebula interface back into the “main” network namespace with a 0.0.0.0/0 route (+unsafe_routes to 0.0.0.0/0). It’s all a bit awkward to configure, but it does seen to work. (not sure it would work with the nebula reload/SIGHUP support, though). The idea of having the client run in one network namespace and then moving its TUN interface into another namespace was taken from the wireguard docs: https://www.wireguard.com/netns/

Link to discussion in the NebulaOSS community Slack: https://nebulaoss.slack.com/archives/CRWJJM52B/p1658476565627369

@jaymemaurice
Copy link

Would this work with some management of the route metrics?

@johnmaguire
Copy link
Collaborator

I'm closing this as a dupe of #280. Let's try to keep discussion over there - thanks!

@johnmaguire johnmaguire closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2022
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

8 participants