WireGuard unable to generate keys
-
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:
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
-
@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 typingecho xxxxxxx | wg pubkey
where xxxxxxx is the private key from the first command... -
Did you try with another webbrowser / private mode / disabled plugins ?
-Rico
-
@rico It was because of my browser, I can now generate the keys without the error message. Thank you for the help
-
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 '/'!
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!
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}