How ca I use two peers with

ajs124 wireguard at
Fri Apr 5 19:48:05 CEST 2019


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


On Mon, 01 Apr 2019 13:05:20 +0300
Дмитрий Марков <dmitri__13 at> 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 for both of them on client side.
> So this my configuration on clientside behind NAT
> [Interface]
> ListenPort = 51820
> PrivateKey = KEY
> [Peer]
> PublicKey = KEY1
> AllowedIPs =
> Endpoint = X.X.X.X:51820
> [Peer]
> PublicKey = KEY2
> AllowedIPs =
> Endpoint = X.X.X.X:51820
> Wireguard don't allow me to use on both of them. How can I use two peers at this situation?
> -- 
> With Best Regards,
> Dmitry Markov

More information about the WireGuard mailing list