bubuntux / nordvpn

NordVpn Docker Client
GNU Affero General Public License v3.0
728 stars 193 forks source link

Invalid Token error even with fresh token - Synology NAS #406

Closed Kelson448 closed 6 months ago

Kelson448 commented 1 year ago

The latest version of the docker container does not seem to work for me on my synology NAS, even with a freshly generated token. I am receiving an invalid token error

Command Used (the tutorial command)

sudo docker run -ti --cap-add=NET_ADMIN --cap-add=NET_RAW --name vpn \
           -e TOKEN=... \
           -e TECHNOLOGY=NordLynx -d ghcr.io/bubuntux/nordvpn

Expected behavior This should create a container that runs and connects to NordVPN

Logs

[0m -    -    [31mIt's not you, it's us. We're having trouble reaching our servers. If the issue persists, please contact our customer support. 
[0mInvalid token.

Additional context Running on a Synology DS923+ Note setting it up directly through the container manager also fails this closed bug (389) has some discussion of others encountering similar errors, and as far as I can tell it hasn't been resolved (but its a closed bug, so I'm creating a new issue so it doesn't get lost.)

jcmschwa commented 1 year ago

I think I'm having the same issue. I have not updated my containers in a long time and I am trying to figure out what updates I need to make to my compose file, and I am getting the exact same messages in the logs despite generating a brand new token.

I've attached the full log and my compose file with the token removed. bubuntux nordvpn invalid token message.txt bubuntux nordvpn docker compose.txt

jcmschwa commented 1 year ago

I tried wrapping my token in quotes in my Docker compose editor (in portainer) and the log message became: "We couldn't log you in - the access token is not valid. Please check if you've entered the token correctly. If the issue persists, contact our customer support."

spencercnorton commented 1 year ago

I am Also having this issue.

[0mInvalid token.

2023/08/12 21:44:49 | stdout |  -    -    It's not you, it's us. We're having trouble reaching our servers. If the issue persists, please contact our customer support.

Generated fresh token. same error.

sulantha2006 commented 1 year ago

Version 3.16.5, still getting the same error.

vpn_1  | Firewall is up, everything has to go through the vpn
vpn_1  | Enabling connection to secure interface and docker network
vpn_1  | No inet6 network
vpn_1  | [custom-init] No custom files found, skipping...
vpn_1  | [ls.io-init] done.
Whoops! /run/nordvpn/nordvpnd.sock not found.
vpn_1  | Invalid token.
ImpatientTomato commented 1 year ago

Exact same error.

philhawthorne commented 1 year ago

I was able to move to the newer Docker image on my Synology running DSM6. My docker-compose I used is below, hopefully this is helpful.

vpn:
    container_name: vpn
    image: ghcr.io/bubuntux/nordlynx
    cap_add:
      - NET_RAW
      - NET_ADMIN               # Required
      - SYS_MODULE              # Required for TECHNOLOGY=NordLynx
    devices:
      - /dev/net/tun            # Required
    sysctls:
      - net.ipv6.conf.all.disable_ipv6=1  # Recomended if using ipv4 only
    security_opt:
      - no-new-privileges:true
    environment:                # Review https://github.com/bubuntux/nordvpn#environment-variables
      - PRIVATE_KEY=REDACTED
      - CONNECT=NORDVPN_TO_CONNECT_TO
      - TECHNOLOGY=NordLynx
      - GROUPID=0
      - TZ=Europe/London
      - NETWORK=192.168.1.1/24 #Adjust for your local network
      - ALLOWED_IPS=0.0.0.0/1,128.0.0.0/1
      - NET_LOCAL=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
      - "POST_UP=ip -4 route add $$(wg | awk -F'[: ]' '/endpoint/ {print $$5}') via $$(ip route | awk '/default/ {print $$3}')"
      - "PRE_DOWN=ip -4 route del $$(route -n | awk '/255.255.255.255/ {print $$1}') via $$(ip route | awk '/default/ {print $$3}')" 
    ports: 
      - 80:80 #Ports to open

Be sure to Install the Wireguard package. Thanks to @b-kamphorst and the others in the discussion here: https://github.com/bubuntux/nordlynx/discussions/41

TheWhiteWarlock commented 1 year ago

Been working for months without any issues, and now I am getting the same error message as the rest of you without having changed anything....

NonalMetal commented 1 year ago

Hi there, I'm facing the same issue after a couple of weeks working fine. I tried changing the original token both with a new expiring token and an illimited one but still gets stuck I used the following docker compose on my DS918+ in the Synology Container manager:

version: "3" services: vpn: image: ghcr.io/bubuntux/nordvpn cap_add:

I saw that with wireguard package there is a private key variable but i'm unsure of where it should come from (wireguard packacge setup maybe?). Maybe updating the bubuntux image with the latest nordvpn release would help? I see there have been messages about a new version up.

cstuart1310 commented 1 year ago

Possibly a coincidence but has worked twice in a row to fix this:

Regen a new token Connect to nordvpn via a standard client (Eg the android app) Update the token in your container and restart.

Literally no idea why it works but it does!

Rageedyo commented 12 months ago

Hi,

Same issue as fellow users have described above. Is there an update? Using Synology= DS1520+ OS version= DSM 7.2-64570 Update 3 Docker Compose on Portainer (via Stacks)


Bubuntux: https://github.com/sponsors/bubuntux To support LSIO projects visit: https://www.linuxserver.io/donate/ ─────────────────────────────────────── GID/UID ─────────────────────────────────────── User UID: 911 User GID: 911 ─────────────────────────────────────── No inet6 network Enabling connection to network 192.xxx.xxx.xxx RTNETLINK answers: Invalid argument [custom-init] No custom files found, skipping... [ls.io-init] done.

-

A new version of NordVPN is available! Please update the application.

-

-

It's not you, it's us. We're having trouble reaching our servers. If the issue persists, please contact our customer support. Invalid token. [migrations] started [migrations] no migrations found fix-attrs: warning: fix-attrs is deprecated, please fix volume permissions in your container manager instead Firewall is up, everything has to go through the vpn Enabling connection to secure interface and docker network No inet6 network usermod: no changes ───────────────────────────────────────


| | | | | | | | | --| | | | | | | | | | | | |||____| || |____||||


  | __  |  |  | |  |  |    \ 
  | __ -|  |  | |  |__|  |  |
  |_____|_____|_|_____|____/ 

Based on images from linuxserver.io ─────────────────────────────────────── To support the app dev(s) visit: Bubuntux: https://github.com/sponsors/bubuntux To support LSIO projects visit: https://www.linuxserver.io/donate/ ─────────────────────────────────────── GID/UID ─────────────────────────────────────── Enabling connection to network 192.xxx.xxx.xxx User UID: 911 User GID: 911 ─────────────────────────────────────── RTNETLINK answers: Invalid argument [custom-init] No custom files found, skipping... [ls.io-init] done.

-

A new version of NordVPN is available! Please update the application.

-

-

It's not you, it's us. We're having trouble reaching our servers. If the issue persists, please contact our customer support. Invalid token. [migrations] started [migrations] no migrations found fix-attrs: warning: fix-attrs is deprecated, please fix volume permissions in your container manager instead Firewall is up, everything has to go through the vpn Enabling connection to secure interface and docker network usermod: no changes No inet6 network ───────────────────────────────────────


| | | | | | | | | --| | | | | | | | | | | | |||____| || |____||||


  | __  |  |  | |  |  |    \ 
  | __ -|  |  | |  |__|  |  |
  |_____|_____|_|_____|____/ 

Based on images from linuxserver.io ─────────────────────────────────────── To support the app dev(s) visit: Bubuntux: https://github.com/sponsors/bubuntux To support LSIO projects visit: https://www.linuxserver.io/donate/ ─────────────────────────────────────── GID/UID ─────────────────────────────────────── User UID: 911 User GID: 911 ─────────────────────────────────────── Enabling connection to network 192.xxx.xxx.xxx RTNETLINK answers: Invalid argument [custom-init] No custom files found, skipping... [ls.io-init] done.

-

A new version of NordVPN is available! Please update the application.

-

-

It's not you, it's us. We're having trouble reaching our servers. If the issue persists, please contact our customer support. Invalid token.


Docker Compose setup:

version: "3" services: vpn: container_name: NordVPN image: ghcr.io/bubuntux/nordvpn cap_add:

ProjectVRD commented 11 months ago

Possibly a coincidence but has worked twice in a row to fix this:

Regen a new token Connect to nordvpn via a standard client (Eg the android app) Update the token in your container and restart.

Literally no idea why it works but it does!

I've missed all the discussion on the move towards token authentication.

What is the format to entering the Token into the yaml file, is it the username or the password... or both username and password together as one long string? It isn't documented on the main page for this image.

irishpadres commented 10 months ago

Possibly a coincidence but has worked twice in a row to fix this:

Regen a new token Connect to nordvpn via a standard client (Eg the android app) Update the token in your container and restart.

Literally no idea why it works but it does!

Tried this and doesn't work for me.

spencercnorton commented 10 months ago

I wanted to throw some additional context in here - I hope this helps, I spent a lot of time and headaches around this issue.

Py9KwZWuNIE1 commented 10 months ago

I have the same issue here, I got the "Invalid token." error, there is any update in this issue?

MacBim commented 10 months ago

Make sure you are disconnected from the VPN in the DSM Network Settings

This fixed the issue for me

JustDen1234 commented 10 months ago

Running once with a valid token. If I stop the project/container and start it again.... invalid token.

ckgt commented 9 months ago

Had same issue. Decided to just build my own docker image using nordvpn client instructions. Also here are the nordvpn token generation instructions. Sorry, no time to actually fix whatever is wrong with this image but here are some findings...

Custom build using nordvpn client instructions works fine and shows "connecting to city... you are connected, etc." There really is no difference in this image except the inclusion of the s6 packages and using the ghcr.io/linuxserver/baseimage-ubuntu:jammy instead of ubuntu:22.04 base image.

I think s6 might be the issue but that's just wild speculation.

You can copy the same nordvpn_login/connect/config/watch scripts over and they work fine to launch with.

zar-ef commented 9 months ago

Had same issue. Decided to just build my own docker image using nordvpn client instructions. Also here are the nordvpn token generation instructions. Sorry, no time to actually fix whatever is wrong with this image but here are some findings...

Custom build using nordvpn client instructions works fine and shows "connecting to city... you are connected, etc." There really is no difference in this image except the inclusion of the s6 packages and using the ghcr.io/linuxserver/baseimage-ubuntu:jammy instead of ubuntu:22.04 base image.

I think s6 might be the issue but that's just wild speculation.

You can copy the same nordvpn_login/connect/config/watch scripts over and they work fine to launch with.

Care to share your dockerfile or repo?

andymaycoates commented 8 months ago

I'm having exactly the same issue on my Synology DS918+ with DSM7.

github-actions[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.