All of lore.kernel.org
 help / color / mirror / Atom feed
* How ca I use two peers with 0.0.0.0?
@ 2019-04-01 10:05 Дмитрий Марков
  2019-04-05 17:48 ` ajs124
  0 siblings, 1 reply; 2+ messages in thread
From: Дмитрий Марков @ 2019-04-01 10:05 UTC (permalink / raw)
  To: WireGuard


[-- Attachment #1.1: Type: text/plain, Size: 618 bytes --]


Hello!

Recently I tried to install wireguard. 

I have 4 computers. 2 of them have public ip. 2 of them behind NAT.

I want to use 2 public PC as endpoits, but I don't understand how to set up 0.0.0.0 for both of them on client side.

So this my configuration on clientside behind NAT
[Interface]
ListenPort = 51820
PrivateKey = KEY
[Peer]
PublicKey = KEY1
AllowedIPs = 0.0.0.0/0
Endpoint = X.X.X.X:51820
[Peer]
PublicKey = KEY2
AllowedIPs = 0.0.0.0/0
Endpoint = X.X.X.X:51820
Wireguard don't allow me to use 0.0.0.0 on both of them. How can I use two peers at this situation?


-- 
With Best Regards,
Dmitry Markov

[-- Attachment #1.2: Type: text/html, Size: 746 bytes --]

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How ca I use two peers with 0.0.0.0?
  2019-04-01 10:05 How ca I use two peers with 0.0.0.0? Дмитрий Марков
@ 2019-04-05 17:48 ` ajs124
  0 siblings, 0 replies; 2+ messages in thread
From: ajs124 @ 2019-04-05 17:48 UTC (permalink / raw)
  To: wireguard

Hey!

There's multiple ways to achieve this, each with its own set of drawbacks.
Firstly though, the reason why this is impossible the way you tried it, can be seen in section two (Cryptokey Routing) of the paper[1].

Now onto how you can do this anyhow:
1. Multiple wireguard interfaces
	The problem being that you need more ports, because you can't listen twice on the same ip on the same port. (Well, you kind of can, but let's just say you can't).
2. Tunnel over wireguard, e.g. IPIP, GRE, VXLAN, etc
	The main drawback is that every tunneling layer comes with more overhead and it's just not a pretty solution, but it should work.

I hope this helps you in solving your problem.

Best Regards
ajs124


[1]: https://www.wireguard.com/papers/wireguard.pdf

On Mon, 01 Apr 2019 13:05:20 +0300
Дмитрий Марков <dmitri__13@mail.ru> wrote:

> Hello!
> 
> Recently I tried to install wireguard. 
> 
> I have 4 computers. 2 of them have public ip. 2 of them behind NAT.
> 
> I want to use 2 public PC as endpoits, but I don't understand how to set up 0.0.0.0 for both of them on client side.
> 
> So this my configuration on clientside behind NAT
> [Interface]
> ListenPort = 51820
> PrivateKey = KEY
> [Peer]
> PublicKey = KEY1
> AllowedIPs = 0.0.0.0/0
> Endpoint = X.X.X.X:51820
> [Peer]
> PublicKey = KEY2
> AllowedIPs = 0.0.0.0/0
> Endpoint = X.X.X.X:51820
> Wireguard don't allow me to use 0.0.0.0 on both of them. How can I use two peers at this situation?
> 
> 
> -- 
> With Best Regards,
> Dmitry Markov
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-05 17:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-01 10:05 How ca I use two peers with 0.0.0.0? Дмитрий Марков
2019-04-05 17:48 ` ajs124

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.