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

one question about "NAT To NAT Connections" #67

Open
runmark opened this issue Jan 20, 2021 · 1 comment
Open

one question about "NAT To NAT Connections" #67

runmark opened this issue Jan 20, 2021 · 1 comment

Comments

@runmark
Copy link

runmark commented Jan 20, 2021

I have two clients (client 2, client 3) behind NATs and one client (client 1) have a static public IP, and I connect them with wireguard VPN. My question is:
when client 2 send message to client 3, or the other way round, the message goes directly to client 3, or go through client 1 then to client 3? and why?

image

@pirate
Copy link
Owner

pirate commented Mar 6, 2021

It's up to you to choose how to route the traffic, wireguard does not automatically do NAT busting or find the shortest path, it just routes based on the rules you define in AllowedIPs. If you want a system that will automatically route from NAT to NAT or find the shortest path, you need a layer on top of wireguard to control it (like Tailscale).

https://tailscale.com/blog/how-nat-traversal-works/

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

2 participants