[WireGuard] Troubleshooting with WireGuard

Jason A. Donenfeld Jason at zx2c4.com
Tue Jul 12 17:49:46 CEST 2016

Hi Quan,

You've goofed up your keys.

srv1.Interface.PrivateKey should be `wg genkey`
srv2.Interface.PrivateKey should be `wg genkey`

srv1.Peer.PublicKey should be `echo srv2.Interface.PrivateKey | wg pubkey`
srv2.Peer.PublicKey should be `echo srv1.Interface.PrivateKey | wg pubkey`

Here's an example:

PrivateKey  = qOmcJSeA6Ewp/PYunF1k2LfMMJRhJQO8L1mMAJBwPnE=
PublicKey = /0I75wp3pTBPj2WOU2olEc+MdZfv/yMkEIfWrQlx5hE=

PrivateKey = UHBCSeBaz2ydkuObf5itzGT1iT66hEQW3VDYEssk6GY=
PublicKey = PRrLsRYLyCto5CMTqnR71hg722/4Uhbd4Xev0QyW+m4=

You can confirm yourself here that srv1.Peer.PublicKey = `echo
srv2.Interface.PrivateKey | wg pubkey` and that srv2.Peer.PublicKey =
`echo srv1.Interface.PrivateKey | wg pubkey`.

This should fix your problem.


More information about the WireGuard mailing list