this post was submitted on 29 Oct 2023
23 points (82.9% liked)

Selfhosted

39980 readers
780 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

How do you debug issues with WireGuard? Things usually go great but every now and then my subsonic server stops streaming (or my client stops getting the music) so his never happens on local network but o my when using WireGuard. Are there tools for debugging it? Cc @[email protected] @[email protected]

top 5 comments
sorted by: hot top controversial new old
[–] [email protected] 9 points 1 year ago (1 children)

You do the usual network checks first, check if wireguard packages come in, check latest handshake. Depending on your network setup you might want to set a lower MTU than default, or enable PersistentKeepalive.

If none of that shows something useful you can enable debug logging via debugfs:

echo module wireguard +p > /sys/kernel/debug/dynamic_debug/control

You'll then have additional messages in dmesg. You can switch it off by doing -p instead.

[–] [email protected] 5 points 1 year ago (1 children)

+1 for MTU and persistent keepalive. The last one helps if the connection is lost after a certain amount of time and does not recover, the first is often the problem when connection is intermittent or just "weird".

Setting MTU requires knowing the MTU of your connection. Many ISPs provide IPv4 encapsulated in IPv6 protocol (Dual Stack Lite, I believe), meaning that from the regular package size you have to deduct the overhead of the encapsulation and if I remember correctly, also the package overhead for wireguard.

[–] [email protected] 4 points 1 year ago* (last edited 1 year ago)

And maybe PPPoE.

traceroute --mtu 1.1.1.1

Pick the lowest value displayed for F=xxxx like e.g F=1492 and subtract 80.

For my DSL connection the optimal value is 1412.

[–] [email protected] 1 points 1 year ago (1 children)

Personally, I just looked at my firewall's logs on the WG port and the handshake info. Once you have a handshake I don't think there's much that can go wrong on the WG side, maybe there's a problem with lost packets or network roaming?

[–] [email protected] 1 points 1 year ago

@[email protected] yeah it looks like it is the latter 🥲