Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Nordvpn and wireguard not working : incorrect key size: 48 #1888

Closed
Scendari opened this issue Sep 30, 2023 · 5 comments
Closed

Bug: Nordvpn and wireguard not working : incorrect key size: 48 #1888

Scendari opened this issue Sep 30, 2023 · 5 comments

Comments

@Scendari
Copy link

Is this urgent?

No

Host OS

OSMC debian

CPU arch

aarch64

VPN service provider

NordVPN

What are you using to run the container

docker-compose

What is the version of Gluetun

Running version latest built on 2023-09-28T14:05:11.407Z (commit d4df872)

What's the problem 🤔

I can't connect Gluetun to Nordvpn using Wireguard.

I get this error :
2023-09-30T06:56:22Z ERROR VPN settings: Wireguard settings: private key is not valid: wgtypes: incorrect key size: 48

My docker-compose :

version: "3"
services:
  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    ports:
      - 9696:9696/tcp
    volumes:
      - /media/SD/appdata/gluetun:/gluetun
    environment:
      - VPN_SERVICE_PROVIDER=nordvpn
      - VPN_TYPE=wireguard 
      - WIREGUARD_PRIVATE_KEY=MYNORDVPN_TOKEN_ON_64CHAR
      - SERVER_COUNTRIES=France

For "WIREGUARD_PRIVATE_KEY", I used my nordvpn token, on 64 char that I got on Nordvpn website :
image

I also tried in "run" mode :

docker run -it --rm --cap-add=NET_ADMIN -e VPN_SERVICE_PROVIDER=nordvpn \
-e VPN_TYPE=wireguard \
-e WIREGUARD_PRIVATE_KEY=MYNORDVPN_TOKEN_ON_64CHAR \
-e SERVER_COUNTRIES=Netherlands qmcgaw/gluetun

Same result :
image

It's working with OpenVPN.

Share your logs (at least 10 lines)

Running version latest built on 2023-09-28T14:05:11.407Z (commit d4df872)

🔧 Need help? https://github.com/qdm12/gluetun/discussions/new
🐛 Bug? https://github.com/qdm12/gluetun/issues/new
✨ New feature? https://github.com/qdm12/gluetun/issues/new
☕ Discussion? https://github.com/qdm12/gluetun/discussions/new
💻 Email? [email protected]
💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
2023-09-30T07:31:34Z INFO [routing] default route found: interface eth0, gateway 172.17.0.1, assigned IP 172.17.0.2 and family v4
2023-09-30T07:31:34Z INFO [routing] local ethernet link found: eth0
2023-09-30T07:31:34Z INFO [routing] local ipnet found: 172.17.0.0/16
2023-09-30T07:31:34Z INFO [firewall] enabling...
2023-09-30T07:31:35Z INFO [firewall] enabled successfully
2023-09-30T07:31:41Z INFO [storage] merging by most recent 17689 hardcoded servers and 17689 servers read from /gluetun/servers.json
2023-09-30T07:31:42Z ERROR VPN settings: Wireguard settings: private key is not valid: wgtypes: incorrect key size: 48
2023-09-30T07:31:42Z INFO Shutdown successful

Share your configuration

version: "3"
services:
  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    ports:
      - 9696:9696/tcp
    volumes:
      - /media/SD/appdata/gluetun:/gluetun
    environment:
      - VPN_SERVICE_PROVIDER=nordvpn
      - VPN_TYPE=wireguard 
      - WIREGUARD_PRIVATE_KEY=MYNORDVPN_TOKEN_ON_64CHAR
      - SERVER_COUNTRIES=France
@qdm12
Copy link
Owner

qdm12 commented Sep 30, 2023

See qdm12/gluetun-wiki#15 (comment)

The wireguard private key isn't your nordvpn token, it's usually 44 characters not 48.

@qdm12 qdm12 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2023
@Scendari
Copy link
Author

Thanks for your answer.

The problem I don't see how to retrieve the private key over the web interface under manual setup

All I can get is service id / service pass and generate a new Token.

@Scendari
Copy link
Author

image

@Scendari
Copy link
Author

I found it following this guide :
https://gist.github.com/bluewalk/7b3db071c488c82c604baf76a42eaad3

sudo apt-get install wireguard

Then connect to Nordvpn with the client on Nordlynx protocol.

Then :
sudo wg show nordlynx private-key

Maybe it's worth it to add that to the wiki.

@angelcervera
Copy link

I found it following this guide : https://gist.github.com/bluewalk/7b3db071c488c82c604baf76a42eaad3

sudo apt-get install wireguard

Then connect to Nordvpn with the client on Nordlynx protocol.

Then : sudo wg show nordlynx private-key

Maybe it's worth it to add that to the wiki.

Does this private-key expires?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants