NordSecurity / nordvpn-linux

NordVPN Linux client
GNU General Public License v3.0
287 stars 44 forks source link

Connection error in a docker swarm #382

Open Florleseige opened 2 months ago

Florleseige commented 2 months ago

Hello,

I try to use the linux app in a docker environment. It works perfectly in a docker-compose.

But I got this message when I try to create my container in a docker swarm service :

The VPN connection has failed. Please check your internet connection and try connecting to the VPN again. If the issue persists, contact our customer support.

In copy you will find my "Dockerfile" (Dockerfile.txt), my "docker-compose.yml" (docker-compose.yml.txt) and my "stack.yaml" (stack.yaml.txt) files.

Here is the command I'm using to create my docker with docker-compose : docker-compose up -d --build --remove-orphans --force-recreate my-service Here is the command I'm using to create my docker service with docker swarm : docker build -t my-service . && docker stack deploy -c stack.yaml my-service

You will need a ".env" file with the "TOKEN" connection value.

Did someone got the same error ?

mariusSincovici commented 2 months ago

hi Because this is a generic error message and it can be caused by multiple failures, could you check the logs for more details about what is causing it?

Florleseige commented 2 months ago

Hi,

I presume you want this logs : logs_1.txt If you need anything else, tell me!

keliramu commented 2 months ago

Hi, log shows sysctl: permission denied on key "net.ipv4.conf.all.rp_filter" - that would mean missing privileged flag when running docker. But I see in your docker compose you have it set privileged: true, then it should be something missing in docker swarm permission setup, my guess.

Florleseige commented 2 months ago

Hello,

I tried with this type of config :

cap_add:
  - NET_ADMIN
  - SYS_MODULE
  - SYS_ADMIN
  - NET_RAW
sysctls:
  - net.ipv6.conf.all.disable_ipv6=1
  - net.ipv4.conf.all.rp_filter=2

And even though I have the net.ipv4.conf.all.rp_filter set to 2 as described in the error, I still get the error message.

Does anyone have an idea for putting the right privileges in a dock swarm ?