r/WireGuard • • 18h ago

Self-hosted VPN with user authentication?

13 Upvotes

Self-hosted VPN with user authentication?

I have five regional OpenVPN gateways running in Docker on my home server using a commercial VPN subscription. Each gateway has its own WireGuard interface, allowing users to choose which location they want to connect to.

My current setup looks like this:

User Devices (WireGuard App)
             |
      My VPN Server
             |
     Regional Gateways
     ├── Toronto
     ├── New York
     ├── London
     ├── Tokyo
     └── Amsterdam
             |
   Commercial VPN Provider
             |
          Internet

I currently use WireGuard Portal to manage peers and generate QR codes.

Instead of distributing WireGuard configs, I'd like users to log in to an app using their own credentials, select a VPN location and connect, just like a regular commercial VPN app. I'd also like to centrally manage and revoke user access.

Is there any open-source, self-hosted application that can do this while utilizing my existing VPN setup?


r/WireGuard • • 12h ago

A tiny auto-switcher for WireGuard on Windows (native ARM64): tunnel off at home, on everywhere else

1 Upvotes

The official WireGuard client for Windows is great, but it has no auto-connect: I kept forgetting to turn the tunnel on in cafés, or leaving it on at home. I tried WG Tunnel, which does this, but on my Surface Laptop (Snapdragon) it felt too heavy for what I needed. So I built something small that does only this one job.

WG-AutoSwitch is a native Windows service plus a tray app that turns your WireGuard tunnels on or off depending on the network you're connected to.

What it does

  • Trusted networks (e.g. home) → tunnel off; everything else → tunnel on. No network → off.
  • Different tunnel per network if you like (e.g. home VPN vs. office VPN).
  • A network only counts as trusted when several things match: gateway MAC address plus DNS suffix, SSID or BSSID. An SSID alone is easy to fake.
  • Waits for captive portal login (hotels, trains) before connecting.
  • Imports .conf files, e.g. straight from the OPNsense peer generator.
  • Uses the official WireGuard for Windows installation. No custom VPN code, it only starts and stops the tunnel services.

Why it's light

  • Native C++/Win32, about 150 KB, native ARM64 and x64
  • Event-driven: no polling and no timers while idle, so no battery drain
  • Runs as a least-privilege virtual service account, not LocalSystem
  • No telemetry. The only network request is an optional daily update check on GitHub, which you can turn off.
  • English and German UI

Honest notes

  • It was written with the help of Claude (AI). The code is public under MIT, so feel free to review it.
  • The releases are not code-signed yet: I've applied to the SignPath Foundation, so SmartScreen may warn you for now.

GitHub: https://github.com/benerages/wg-autoswitch

Feedback, bug reports and feature ideas are very welcome. I'd especially like to hear from other Windows-on-ARM users.


r/WireGuard • • 11h ago

iOS with AT&T wireless [ Recent struggles ]

3 Upvotes

I've had the iOS WG client on my AT&T for several years and it's been flawless. Around August timeframe, I started having issues sustaining my connection. The tunnel connects back to house over standard UDP 51820 port in my PFSense Firewall. I performed a packet capture last week when the tunnel went down and saw no external traffic attempts on that port. [ but maybe I won't see UDP attempts anyways? ]

- WG Tunnels work great on static remote devices [ external routers or peer servers in cloud ]

- I tried switching my iOS tunnel over to IPv6 and experienced same issues [ with a separate cloudflare DNS name for IPv6 ]

- The tunnel "does" work sometimes on my iPhone for a bit, it just doesn't sustain.

- Have not had a chance to test this on phone when connected to an outside WiFi, mainly because I think the issue is when it switches towers or interfaces on the phone.

Coincidentally, I did update my PFSense router around the same time I started noticing this. I've semi-ruled this out though since the handshake appears to die and not attempt new connections.

Is this something with AT&T's mobile network that I need to workaround? I'm about to deploy the tunnels to spouse and kids and starting to consider using Tailscale instead...

Attaching a iOS log snippet for feedback. It repeats similar cycle over and over:

[NET] peer(pT8P…llW4) - UAPI: Updating endpoint
2026-11-17 07:32:06.469
[NET] Routine: receive incoming v4 - stopped
2026-11-17 07:32:06.469
[NET] Routine: receive incoming v6 - stopped
2026-11-17 07:32:06.470
[NET] UDP bind has been updated
2026-11-17 07:32:06.470
[NET] Routine: receive incoming v4 - started
2026-11-17 07:32:06.470
[NET] Routine: receive incoming v6 - started
2026-11-17 07:32:07.031
[NET] peer(pT8P…llW4) - Handshake did not complete after 5 seconds, retrying (try 2)
2026-11-17 07:32:07.031
[NET] peer(pT8P…llW4) - Sending handshake initiation
2026-11-17 07:32:12.122
[NET] peer(pT8P…llW4) - Handshake did not complete after 5 seconds, retrying (try 3)
2026-11-17 07:32:12.122
[NET] peer(pT8P…llW4) - Sending handshake initiation
2026-11-17 07:32:14.635

EDIT: Also found this user post on Ubiquiti but I was not able to find reference to others with this problem as the OP mentions. Wireguard breaks on AT&T 5G