OPNsense Forum

English Forums => Virtual private networks => Topic started by: planetf1 on April 21, 2024, 01:30:33 PM

Title: wireguard peer generator - QR code is invalid
Post by: planetf1 on April 21, 2024, 01:30:33 PM
opnsense 24.1.6 : I've created a wireguard interface, and used the peer generator to generate a configuration for an iOS device.

I did add a pre-shared key, and have also specified a DNS server, and also tried a keepalive (optional)

When using the *official* wireguard app on IOS, I get 'Invalid QR code' (with or without the PSK)

Is this expected to work?
Title: Re: wireguard peer generator - QR code is invalid
Post by: planetf1 on April 21, 2024, 01:34:35 PM
The generated config is:

[Interface]
PrivateKey = longkey
Address = 10.10.10.2/32
DNS = 9.9.9.9

[Peer]
PublicKey =
PresharedKey = longpsk
Endpoint = 1.2.3.4
AllowedIPs = 0.0.0.0/0,::/0
PersistentKeepalive = 90
Title: Re: wireguard peer generator - QR code is invalid
Post by: greeno on April 21, 2024, 06:38:25 PM
I've tried that also, same error !...
Title: Re: wireguard peer generator - QR code is invalid
Post by: MoonbeamFrame on April 21, 2024, 06:46:24 PM
Could you be missing the end-point port number?

And presuming you have a peer PublicKey value.
Title: Re: wireguard peer generator - QR code is invalid
Post by: banuseka on April 22, 2024, 09:17:56 AM
port number is key here, true.

But also, one note that the port is not transfered to the peer "endpoint port" field, that has to be adapted manually.
Title: Re: wireguard peer generator - QR code is invalid
Post by: user8636394367 on October 16, 2024, 05:00:48 PM
FWIW I'm using duckdns and autocorrect put a space between "duck" and "dns". That caused this error for me.
Title: Re: wireguard peer generator - QR code is invalid
Post by: hakuna on October 31, 2024, 08:07:15 AM
I got similar experience on my Samsung Tablet ( Android )
On my phone ( GrapheneOS ) thankfully everything worked like a dream.

I used to have a dedicated WireGuard VPN VM coz it was a nightmare to get it working on OPNSense, with the latest release things are a lot smoother.

The workaround for me would be:


It will generate the QR code for you.
If this is a OPNSense thing, it will work.
That is how I used to generate the QR code for the self hosted WireGuard before moving to OPNSense.