wireguard-p2p icon indicating copy to clipboard operation
wireguard-p2p copied to clipboard

if two nodes behind nat without public ip, can they make mesh vpn?

Open youxiaojie opened this issue 6 years ago • 8 comments

if two nodes A and B behind nat without public ip, can they make mesh vpn? if no, if there is node C with pub ip and port, can node A and B get each other's NATed pub ip and port and make a connexion? does your program make help?

youxiaojie avatar Jun 05 '19 06:06 youxiaojie

What do you mean by "nat without public ip"? Do you mean no internet access or no dedicated IP?

manuels avatar Jun 05 '19 18:06 manuels

In the first part I guess he's asking if there's local peer discovery? (A and B finding each other on the LAN) I'm very interested in having that too.

whirm avatar Jun 09 '19 08:06 whirm

@whirm, I'm afraid, this is not supported right now unless you run a OpenDHT bootstrapping node in your LAN.

manuels avatar Jun 10 '19 09:06 manuels

I mean A has 192.168.1.5 at home behind firewall and B has 172.16.1.3 in office behind firewall, both firewall are not configurable by me. If without a C with public ip, did they make mesh vpn each other by your wireguard-p2p? if I get a vpc with public ip and run your software, did A B are exchange information after connection established or all the information are relayed by C? thanks. because vpc is abroad, if all udp packet are relayed by C that is very slow, so I ask you if A and B can exchange udp directly,after getting each others NATed port and ip under the node C's help.

youxiaojie avatar Jun 11 '19 14:06 youxiaojie

I think a similar question for which unfortunately I believe the answer is know. My ISP put me under a proxy and there is no transparent NAT. My public IP is not mine but of the proxy server. So any incoming connections will be refused while outgoing will be somewhat fine. Is there a way to establish a direct tunnel between A and B clients with similar network condition? I don't think so but I just discovered this project and I may try it.

danisztls avatar Apr 30 '20 23:04 danisztls

@danielsouzat you could try a tool that wraps UDP in fake-TCP. I have seen a tool around for that but I cannot remember the name.

manuels avatar May 01 '20 10:05 manuels

That may work but wouldn't it add a lot of overhead?

danisztls avatar May 02 '20 01:05 danisztls

That depends on how you define "a lot". You'd probably have to add a TCP header which increases the package size by a few bytes and I think computation is negligible.

manuels avatar May 02 '20 07:05 manuels