Wireguard client connection problems

Hi I am running CoreELEC version,
CoreELEC (official)
19.4-Matrix
Amlogic-ng.arm

Running on a Odroid N2+

I was following the Wireguard client set up…

Installation of WireGuard client in CoreELEC:

Create the file /storage/.config/wireguard/wireguard.config with the following content:

[provider_wireguard]
Type = WireGuard
Name = WireGuard VPN
Host =
Domain = COREELEC
WireGuard.Address = <private_ip_addres_from_file_peer_test.conf_in_server>/32
WireGuard.PrivateKey = <privatekey_from_file_peer_test.conf_in_server>
WireGuard.PublicKey = <publickey_from_file_peer_test.conf_in_server>
WireGuard.DNS = 8.8.8.8,8.8.4.4
WireGuard.AllowedIPs = 0.0.0.0/0
WireGuard.EndpointPort = 51820
WireGuard.PersistentKeepalive = 25

Next in Kodi System-CoreELEC-Connections enable WireGuard VPN.

I changed the necessary fields to my own, which work using a Wireguard client on my PC.

When I go to Coreelec, connection, I see the WireGuard VPN listed, the state is idle and type is manual.

After pressing connect, it quickly changes to state: failure.

Ok I figured it out, 2 things,

From another forum, The config should contain public key of server not client.

Code:
WireGuard.PublicKey = [server public key] The config should contain public key of server not client.

Code:
WireGuard.PublicKey = [server public key]

I changed the config to this and still it would not connect.
Lastly I used the VI editor and checked to see where the end of lines were.
I had three lines with an extra space at the end. I removed all the blank spaces at the end of all lines. I then tried connecting, and I was SUCCESSFUL!

I will leave this here in case others have the same issue.

Walter

Check your settings. This works very well for me:

[provider_wireguard]
Type = WireGuard
Name = WG-Client-11
Host = [server-ip]
WireGuard.Address = 10.10.20.11/32
WireGuard.ListenPort = 51820
WireGuard.PrivateKey = [your-key]
WireGuard.PublicKey = [your-key]
WireGuard.DNS = [dns-ip]
WireGuard.AllowedIPs = 0.0.0.0/0
WireGuard.EndpointPort = 51820
WireGuard.PersistentKeepalive = 25

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.