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

      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

      luckman212L 1 Reply Last reply Reply Quote 0
      • luckman212L
        luckman212 LAYER 8 @twcory
        last edited by luckman212

        @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
        • RicoR
          Rico LAYER 8 Rebel Alliance
          last edited by

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

          -Rico

          T 1 Reply Last reply Reply Quote 1
          • T
            twcory @Rico
            last edited by

            @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 Reply Quote 1
            • R
              rxa @twcory
              last edited by rxa

              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.