Pre-shared keys - 44Net Connect
A pre-shared key (PSK) is an additional random secret shared by your device and the 44Net Connect endpoint. It supplements the public and private keys that WireGuard already uses. Both ends must use exactly the same PSK for WireGuard handshakes to succeed.
This guide explains how to set a PSK on a Connect tunnel. For the background and our planned security changes, see Post-quantum cryptography. Existing tunnels do not require changes at this time, and there is currently no scheduled retirement date for tunnels without a PSK.
Before you start
Changing a PSK can interrupt the tunnel until both ends have matching settings. If you administer your device through its Connect tunnel, consider having another way to reach it before changing its configuration.
Keep a protected copy of your working configuration, including your device's private key. You do not need to regenerate the public/private key pair to add a PSK. Each tunnel should have its own randomly generated PSK; do not use a memorable password.
Set the key in Connect
- Sign in to the Connect dashboard and open the tunnel you want to update.
- Choose Edit and locate the Preshared Key field in the WireGuard settings.
- Use the rotation button beside the field and confirm generation. Alternatively, enter a PSK you generated securely yourself.
- Copy the PSK to a protected location so you can enter the same value on your device.
- Before saving, make sure you have copied the key and can still reach the device. Saving can interrupt this tunnel until you apply the same PSK on your device.
- Choose Save Changes and complete any save confirmation. Generating a key only fills in the form; saving applies the change to the tunnel record.
The dashboard's generator runs on the Connect server and returns the generated key to your browser. The PSK is stored with the tunnel and included in generated client configurations. It is not subject to the private key's one-time display restriction.
Set the same key on your device
- Open the WireGuard configuration for this tunnel on your device or router.
- Add or replace the
PresharedKeysetting in the[Peer]section for the Connect endpoint. Use exactly the value saved in Connect. - Save and apply the configuration using your device's usual WireGuard controls.
- Generate traffic through the tunnel and check for a recent successful handshake. Test traffic in both directions, including any services or routed networks you use.
Configuration example
The following excerpts show where the PSK belongs in a WireGuard configuration file. They are illustrative, incomplete configurations; the values in angle brackets are placeholders.
Before: a peer without a PSK
[Peer] PublicKey = <Connect endpoint public key> Endpoint = <Connect endpoint address and port> AllowedIPs = <your existing allowed IPs>
After: the same peer with a PSK
[Peer] PublicKey = <Connect endpoint public key> PresharedKey = <the PSK configured for this tunnel in Connect> Endpoint = <Connect endpoint address and port> AllowedIPs = <your existing allowed IPs>
The added setting is PresharedKey in the [Peer] section for the Connect endpoint. For an existing tunnel, preserve the other settings.
If your router has a WireGuard configuration screen, the corresponding field may be called Pre-shared key or Preshared key. On some systems, the field may be in a separate section for advanced or additional settings. Check your device's documentation for details.
For an existing tunnel, keep its private key, public key, addresses, endpoint, and routing settings. If you download a fresh configuration, check it before importing: configurations obtained after the initial setup may contain REPLACE_WITH_YOUR_PRIVATE_KEY, which must be replaced with your existing device private key. If you lose your private key, you can generate a new key pair in the dashboard, then update your device with the matching configuration.
For a new tunnel, include its PSK when installing the issued configuration. For a replacement tunnel, use the configuration issued for that new tunnel, including its keys, addresses, and endpoint settings.
If the tunnel does not reconnect
Check that the PSK on your device matches the value saved for this tunnel in Connect, that it is in the correct peer section, and that the updated configuration has been applied. Check that the device's private key and other tunnel settings were preserved. Do not post either secret when asking for help through Get Help.
If you need to revert, both ends must return to matching settings. Removing the PSK from only one end will not restore the connection.
Keeping the key and the connection secure
Treat the PSK as a secret. Do not include it in screenshots, public configuration examples, or support posts. Keep configuration files containing it protected, just as you protect your WireGuard private key.
A new PSK protects traffic established using that PSK. Adding one now does not retroactively protect traffic previously recorded from a tunnel without it.
WireGuard encrypts traffic between your equipment and the Connect endpoint. Traffic beyond that endpoint needs its own protection, such as HTTPS or SSH. A PSK does not change which services your firewall exposes to the Internet. See Securing your connection and Firewalling Basics.
For help with Connect, see Get Help.