question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OpenWRT 18.06 and wireguard: probably a bug

See original GitHub issue

Hi, I noticed a strange behaviour of wireguard 0.0.20180718-2 with openWRT OpenWrt 18.06.1 r7258-5eb055306f.

opkg install wireguard kmod-wireguard luci-app-wireguard luci-proto-wireguard wireguard-tools
Package wireguard (0.0.20180718-2) installed in root is up to date.
Package kmod-wireguard (4.9.120+0.0.20180718-2) installed in root is up to date.
Package luci-app-wireguard (git-18.284.42397-55ebe88-1) installed in root is up to date.
Package luci-proto-wireguard (git-18.284.42397-55ebe88-1) installed in root is up to date.
Package wireguard-tools (0.0.20180718-2) installed in root is up to date.

The problem is that if I use only one peer, all works well. While if I add more peers the LUCI configuration under interface->wireguard interface name is different from the one of wireguard.

root@BTHomeHub:/# wg showconf wireguard
[Interface]
ListenPort = 51820
PrivateKey =

[Peer]
PublicKey = fEq76eJ+YYvOZMZB+5TVJ0T1mlRqdTKl1kWZsOQq111=
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = IP:3032
PersistentKeepalive = 25

[Peer]
PublicKey = SzmAUqFzWRHazql4EGVgphTdUBFq8Wus980nCl99111=
## missing line
Endpoint = IP:51820
PersistentKeepalive = 25

## missing peer

I did not find any file under/etc/configas usual.

wg
interface: wireguard
  public key: xhrX4aXDNUw2eCygHnXQYuaYpRKemY1HbshLATzI111=
  private key: (hidden)
  listening port: 51820

peer: fEq76eJ+YYvOZMZB+5TVJ0T1mlRqdTKl1kWZsOQq111=
  endpoint: IP:3032
  allowed ips: 0.0.0.0/0, ::/0
  transfer: 0 B received, 46.11 KiB sent
  persistent keepalive: every 25 seconds

peer: SzmAUqFzWRHazql4EGVgphTdUBFq8Wus980nCl99111=
  endpoint: IP:51820
  allowed ips: (none) ## missing
  transfer: 0 B received, 38.73 KiB sent
  persistent keepalive: every 25 seconds

## missing a peer

Best Regards

P.S. Also the field preshared key seems not work properly with more than one peer.

luci1 luci2

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:30 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
KuriKaicommented, Nov 21, 2018

@erotavlas85 How many of the AllowedIPs for your peers are set to “0.0.0.0/0, ::/0”? I had my three peers all set to: peer1 allowed ips “0.0.0.0/0” peer2 allowed ips “0.0.0.0/0” peer3 allowed ips “0.0.0.0/0”

and that was causing the issue for me. I changed them to the ip of the address of the client: peer1 allowed ips 10.0.2.2/32 peer2 allowed ips 10.0.2.3/32 peer3 allowed ips 10.0.2.4/32

and the problem was solved

1reaction
danrlcommented, Nov 21, 2018

@jow- I think we can close this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Solved] Should I report a WireGuard problem as a 'bug'?
I am new to OpenWrt, so it may be the mistake is mine, but if it is, it can only be that the...
Read more >
Wireguard Connection Problem - Installing and Using OpenWrt
So installed Wireguard and my iOS Client connects but the router didnt show a connection and i cant access and website on my...
Read more >
Wireguard freezes after a short time - OpenWrt Forum
It is entirely possible that there are errors in the process and/or a bug in the creation of the firmware image itself (every...
Read more >
OpenWrt 18.06.2 Service Release - Installing and Using OpenWrt ...
OpenWrt 18.06.2 incorporates a fair number of bug fixes in the network userland and the build system, as well as updates to the...
Read more >
[Solved] 19.07 Upgrade renders Wireguard Client Inoperable
After many hours playing with different settings I reverted to 18.06.6 ar71xx - which works fine. OpenWrt 19.07.0 first stable release.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found