You are not logged in.

#1 2019-11-27 21:03:38

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,867
Website

Multiple wireguard peers on the same PC does not work [SOLVED]

I'd like to have 2 concurrent WG interfaces, each running on a different ListenPort.  I can bring up both interfaces at the same time, but only the first one I started actually flows traffic.  The other just seem to allow a handshake to/from the peer but no traffic is flowing.  If any 1 of them is started by itself, it works as expected so that rules out a firewall configuration I think.  Has anyone else experienced this?

Example:

/etc/wireguard/wg0.conf
/etc/wireguard/wg1.conf

If I post the diff of these two files, they would just differ by the value I used for the ListenPort var.  When I look at the log on my WG app (phone) it shows the successful hand shake and keep alive packets with a tunnel status of "connected" so not much to go on.

Last edited by graysky (2019-11-28 12:27:53)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2019-11-27 21:23:18

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 545
Website

Re: Multiple wireguard peers on the same PC does not work [SOLVED]

They should also differ in terms of keys, since WireGuard does Cryptokey Routing.

Offline

#3 2019-11-27 21:53:58

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,867
Website

Re: Multiple wireguard peers on the same PC does not work [SOLVED]

schard wrote:

They should also differ in terms of keys, since WireGuard does Cryptokey Routing.

Thanks for the reply.  You're suggesting that I need to generate a unique keypair for both peers for wg0 and for wg1?

Last edited by graysky (2019-11-27 21:54:22)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2019-11-27 22:34:41

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 545
Website

Re: Multiple wireguard peers on the same PC does not work [SOLVED]

You need unique public keys because WireGuard uses those to address the packets.
See https://WireGuard.com for details.

Offline

#5 2019-11-28 12:27:37

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,867
Website

Re: Multiple wireguard peers on the same PC does not work [SOLVED]

<<Head smack>> ... running OpenVPN for too long, thanks!


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB