Problems installing VPN container

  • You might consider posting the entire compose file you pasted into the stack window, but do sanitize it to remove your VPN credentials.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Thanks for your answer, here it is. I have followed the guide but changed transmission to Qbittorretn.

    Googling this error seems to indicate a problem with the kernel.


    version: "3"

    services:

    vpn:

    image: bubuntux/nordvpn

    network_mode: bridge # Required

    cap_add:

    - NET_ADMIN # Required

    - SYS_MODULE # Required for TECHNOLOGY=NordLynx

    sysctls:

    - net.ipv4.conf.all.rp_filter=2

    devices:

    - /dev/net/tun # Required

    environment: # Review https://github.com/bubuntux/nordvpn#environment-variables

    - USER=******* # Required

    - "PASS=*******" # Required

    - CONNECT=Sweden

    - TECHNOLOGY=NordLynx

    - CYBER_SEC=Enable

    - NETWORK=192.168.*.*/24

    - TZ=Europe/Stockholm

    - GROUPID=100

    ports:

    - 8080:8080

    - 6881:6881

    - 6881:6881/udp


    torrent:

    image: linuxserver/qbittorrent

    container_name: qbittorrent

    environment:

    - PUID=1000

    - PGID=100

    - TZ=Europe/London

    - UMASK_SET=022

    - WEBUI_PORT=8080

    volumes:

    - /srv/dev-disk-by-label-Misc/appdata/qbittorrent:/config

    - /srv/dev-disk-by-label-media/Downloads:/downloads

    restart: unless-stopped

    network_mode: service:vpn

    depends_on:

    - vpn



    # The torrent service would be available at https://localhost:8080/ or anywhere inside the local network http://192.168.1.xxx:8080

  • Hi,


    I'm trying this to get it to work, but no luck. Could you give us a how to? The link above is dead.


    This is what my portainer web-edit looks like:



    Output error:


    Code
    Deployment error
    yaml.parser.ParserError: while parsing a block mapping in "/data/compose/12/docker-compose.yml", line 3, column 3 expected , but found '' in "/data/compose/12/docker-compose.yml", line 43, column 4 

    Any ideas?

    • Offizieller Beitrag

    Seems your indention is wrong.

    Try it like this



    Portainer helps here a lot. It shows a small red dot with an x inside, if something is wrong.

    • Offizieller Beitrag

    Seems your indention is wrong.

    Portainer helps here a lot. It shows a small red dot with an x inside, if something is wrong.

    This is why I usually tell newbs wanting to try docker-compose, to start with Portainer and stacks. If there's a formatting error (as there often can be when copying/pasting from websites).. it will be pointed out and you won't be able to deploy if it isn't right..


    U

  • When you paste the lines in the Portainer webeditor, just scroll up/down with the arrow keys and, if there's any error with the idents, it will show on the left side of the lines.


    Then, it's a matter of adding/deleting spaces from the lines (I really hate the webeditor, sorry, :D )

  • Yess I see it now. thus far it is able to download torrents. I have not double checked if it is actually using the vpn. Download speeds are the same as with normal downloads. Must note that using nordlynx the download speed comes very close to normal speed. The bubuntux/nordvpn stack/container does take quite some time, keeps showing ''starting'' for a few minutes. After that ''healthy''. Having trouble copy/paste log here...

  • part of the log:



    And then some random numbers in groups at the end that keeps renewing. I guess those are the cyphers?

    Oh for those who are wondering.. Over 50 MB/s download speeds :):thumbup:. Tested it with a ubuntu torrent.

  • Ok now I am able to download normally. What I did was:


    - enable cybersec by adding - CYBER_SEC=Enable to the stack

    - shutdown qbittorent manually in the webgui

    - stop/start qbitorrent and qbittorrentlynx_vpn_1 containers



    -update-


    After some time being idle with no active torrent any newly added torrent would start 'stalled' right away. Needs restart of qbittorrent container. Gonna tinker some more....

  • Can't figure out what goes wrong. Can someone be of assistance please?

    Much appreciated!

    Probably not the answer you're looking for, but maybe you can try it with an different vpn container (a quick test won't hurt).

    I can recommend Gluetun. I use this for years now (with different vpn providers).

    HP t630 Thin Cliënt (AMD Embedded G-Series GX-420GI | QuadCore | 8GB)
    7.0.5-1 (Sandworm) | 64 bit | pve-kernel-6.8 | omvextrasorg 7.0

  • Thank you for your input. Currently I am messing around with a different qbittorrent image, ghcr.io/linuxserver/qbittorrent in a seperate stack with the following code added:

    Code
    -net=container:vpn \

    This will enable the torrent client to send and receive traffic through the vpn container according to this website:

    https://jordanelver.co.uk/blog…through-a-vpn-connection/


    Download en upload works this way now. No idea yet if the earlier problem persists. Will update post in a few hours.

  • Ok it works. Full download speed still and no 'stalled' problem after being idle for more than hour. Final solution:



    Hope this is usefull for someone.


    Greetings


    -Update-

    Forgot to add:


    - NET=CONTAINER:VPN


    -Update-

    Changed PUID for security reasons mentioned by Soma and macom


    -Update-

    Still doesn't function properly. Still uses public ip.


    -Update-

    Have a solution that works for me, look on page 2.

  • I don't think Qbittorrent uses your vpn-tunnel this way.

    HP t630 Thin Cliënt (AMD Embedded G-Series GX-420GI | QuadCore | 8GB)
    7.0.5-1 (Sandworm) | 64 bit | pve-kernel-6.8 | omvextrasorg 7.0

  • - PUID=998

    And you're using this user because....?!?


    The policy for docker is to use a unprivileged user (eg: user 1000 UP, on RPi it would be the "pi") adding it to "docker" group

  • He uses the admin account.

    Yeah, that's a really good thing to do on a server...


    Sorry, but that's a BIG RED FLAG

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!