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

WireGuard unable to generate keys

Scheduled Pinned Locked Moved WireGuard
5 Posts 4 Posters 1.5k 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.
  • T
    twcory
    last edited by May 17, 2022, 11:12 PM

    Hello,

    I just wanted to try out WireGuard to remotely access my network. The problem that I am having is that I seem to be unable to generate private and public keys for a tunnel. Every time I try to generate new keys via the "Generate" button, this happens:

    558bec18-ea41-4ef0-aeba-a587ea81fb60-image.png

    This is strange to me as in the video tutorials I watched and the guide on netgate, it seems like I should just be able to click generate and it should just work, but not for me? Any help would be appreciated, thanks

    L 1 Reply Last reply May 18, 2022, 3:18 AM Reply Quote 0
    • L
      luckman212 LAYER 8 @twcory
      last edited by luckman212 May 18, 2022, 3:18 AM May 18, 2022, 3:18 AM

      @twcory Try reinstalling the package? Do you have console / ssh access? Try menu option 8 and then run wg genkey and see what that outputs. If it works, try copying the key and typing echo xxxxxxx | wg pubkey where xxxxxxx is the private key from the first command...

      1 Reply Last reply Reply Quote 0
      • R
        Rico LAYER 8 Rebel Alliance
        last edited by May 18, 2022, 2:12 PM

        Did you try with another webbrowser / private mode / disabled plugins ?

        -Rico

        T 1 Reply Last reply May 18, 2022, 7:00 PM Reply Quote 1
        • T
          twcory @Rico
          last edited by May 18, 2022, 7:00 PM

          @rico It was because of my browser, I can now generate the keys without the error message. Thank you for the help

          R 1 Reply Last reply Dec 30, 2022, 5:59 PM Reply Quote 1
          • R
            rxa @twcory
            last edited by rxa Dec 30, 2022, 6:00 PM Dec 30, 2022, 5:59 PM

            I have the same problem. Tried both Safari and Firefox on macOS.

            I get this error in Safari's console upon clicking Generate:
            SyntaxError: JSON Parse error: Unrecognized token '/'!
            Screenshot 2022-12-30 at 19.53.00.png

            I get this error in Firefox's console upon clicking Generate:
            Uncaught SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data!
            Screenshot 2022-12-30 at 19.55.03.png

            I've inspected the JSON response and there was an offending / in the start of the response which makes it invalid:

            /{"privkey":"...","pubkey":"...","was_clamped":true}
            
            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              [[user:consent.lead]]
              [[user:consent.not_received]]