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

Automatic relaying behind NAT for DCUtR #201

Open
6ixfalls opened this issue Apr 23, 2024 · 1 comment
Open

Automatic relaying behind NAT for DCUtR #201

6ixfalls opened this issue Apr 23, 2024 · 1 comment

Comments

@6ixfalls
Copy link

I have two nodes, one node has a public address, and another that does not (behind NAT). The node behind NAT can communicate with the node with a public address, but the node with a public address can't dial back. From testing, it appears edgevpn doesn't handle this, but there are specs documented in libp2p that fix this.

Notably, the libp2p Circuit Relay v2 protocol solves this issue by allowing a node to act as a relay. In addition, the Direct Connection Upgrade through Relay protocol allows this to be upgraded into a direct connection, which has the same benefits as direct node-node communication. Ideally, the node with a public address could also act as a relay, which would allow for the other node behind NAT to negotiate with it to connect. This solution would also allow for more nodes of either type to be added without compromising the performance of the network.

I notice that edgevpn has options to add node addresses, but I'm not sure if this works with the Circuit Relay protocol or DCUtR. Edgevpn should automatically negotiate and run these relays so that nodes can connect indirectly.

To summarize, currently, edgevpn doesn't work at all if one of the nodes is behind NAT, only one node can negotiate with the other, manifesting as the node showing up on the public node's blockchain while the private node is empty. Introducing automatic negotiation using the Circuit Relay protocol and the DCUtR protocols would allow edgevpn to traverse these NAT conditions, and allows it to be used in more use cases, such as bridging personal devices into a Kairos cluster for development and management.

@6ixfalls
Copy link
Author

Possibly fixed through a lot of configuration, but will do deeper testing to confirm

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

1 participant