Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Wireguard tunnel lost its peers

    Scheduled Pinned Locked Moved Plus 25.03 Develoment Snapshots
    4 Posts 2 Posters 432 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • patient0P
      patient0
      last edited by patient0

      Today I updated from 24.11 to 25.03-BETA (amd64) built on Mon Apr 14 20:38:00 CEST 2025.

      There are two Wireguard tunnel configured:
      tun_wg0 -> assigned to an interface, tunnel to a VPS
      tun_wg1 -> not assigned, peers are 6 clients who call home

      tun_wg0 looks ok, for tun_wg1 in VPN / WireGuard / Tunnel & Peers all looks fine, for the peers tun_wg1 is shown as tunnel. But under VPN / WireGuard / Status none of the peers are listed.
      Wireguard fails to start and if I try to disable tun_wg1 it throws a 503:
      pfsense-25-03_wg_error-503.jpg

      ... and the PHP crash report:

      Crash report begins.  Anonymous machine information:
      
      amd64
      15.0-CURRENT
      FreeBSD 15.0-CURRENT #0 plus-RELENG_25_03-n256497-da24eca0fcd2: Mon Apr 14 19:32:49 UTC 2025     root@freebsd:/var/jenkins/workspace/pfSense-Plus-snapshots-25_03-main/obj/amd64/ILoDLiJx/var/jenkins/workspace/pfSense-Plus-snapshots-25_03-main/sources/FreeB
      
      Crash report details:
      
      PHP Errors:
      [18-Apr-2025 18:42:27 Europe/Zurich] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/wireguard/includes/wg_api.inc:260
      Stack trace:
      #0 [internal function]: {closure}('2a02:169:31e2:1...')
      #1 /usr/local/pkg/wireguard/includes/wg_api.inc(256): array_map(Object(Closure), Array)
      #2 /usr/local/pkg/wireguard/includes/wg.inc(677): wg_interface_update_addresses('tun_wg1', Array)
      #3 /usr/local/pkg/wireguard/includes/wg.inc(620): wg_tunnel_sync_by_name('tun_wg1', false)
      #4 /usr/local/www/wg/vpn_wg_tunnels.php(54): wg_tunnel_sync(Array, true, true)
      #5 {main}
        thrown in /usr/local/pkg/wireguard/includes/wg_api.inc on line 260
      
      
      
      No FreeBSD crash data found.
      

      Addition: on tun_wg1 I got two interface addresses, an IPv4 and an IPv6 address. After removing the IPv6 address it works again. Adding the IPv6 address again, and the error pops up again also.
      That should be a supported setup, yes?

      1 Reply Last reply Reply Quote 0
      • M
        marcosm Netgate
        last edited by

        Thanks! Should be fixed now:
        https://redmine.pfsense.org/issues/16160

        patient0P 2 Replies Last reply Reply Quote 1
        • patient0P
          patient0 @marcosm
          last edited by

          @marcosm thanks a lot, will try tomorrow when I’m back home.

          1 Reply Last reply Reply Quote 0
          • patient0P
            patient0 @marcosm
            last edited by

            @marcosm after applying the patch IPv6 as the second interface address is up and running again.

            Thanks you and have a great weekend.

            1 Reply Last reply Reply Quote 1
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.