• Connect to VPN container


    niXta-
    • Minor

    Hi all!

     

    I have been able to run a VPN container called 'vpn' and connect all my other containers through it with these settings:

    Extra Parameters: --network='container:vpn'
    Network Type: None

    This has worked since I started to use unRaid 6 months ago or so.

    Version: 6.7.3-rc4 works fine but 6.8.0 rc5 gives an error:

    Quote

    Error response from daemon: Container cannot be connected to network endpoints: container:vpn, none.

    Has the docker version changed? Any ideas how to get this running again?




    User Feedback

    Recommended Comments

    It worked until I updated the vpn container.

    To have the containers connect again you need to restart them. Then this happens:

    Pulling image: linuxserver/bazarr:latest
    IMAGE ID [latest]: Pulling from linuxserver/bazarr. 
    Status: Image is up to date for linuxserver/bazarr:latest
    
    TOTAL DATA PULLED: 0 B
    
    
    Removing container: bazarr
    Successfully removed container 'bazarr'
    
    
    Command:
    root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker create --name='bazarr' --net='none' --log-opt max-size='50m' --log-opt max-file='1' -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -e 'PUID'='99' -e 'PGID'='100' -v '/mnt/user/media/':'/media':'rw,slave' -v '':'/movies':'rw' -v '':'/tv':'rw' -v '/mnt/user/appdata/bazarr':'/config':'rw' --network='container:vpn' 'linuxserver/bazarr' 
    Error response from daemon: Container cannot be connected to network endpoints: container:vpn, none
    
    The command failed.

     

    root@plex-server:~# docker network ls
    NETWORK ID          NAME                    DRIVER              SCOPE
    08d7b7cb786e        br0                     macvlan             local
    b1378c44dfa6        bridge                  bridge              local
    e9baf8b456d9        host                    host                local
    299acc6193c1        none                    null                local
    5515d3dc02cd        plex-network            bridge              local
    66e6c10f20eb        reverse-proxy-network   bridge              local

     

    Link to comment

    This issue started with 6.8.0-rc1, which updated docker to v19.03.3.

     

    In this & newer docker releases, Docker won't accept multiple '--net' arguments/support connecting to multiple network endpoints. 'Network type: none' already adds the network argument (--net='none') to the docker run command, so when you add --network='container:vpn' or --net='container:vpn' to extra arguments, it doesn't override the 'Network type: none' already specified on the docker template, thus trying to connect to 2 network endpoints.

     

    A workaround to this issue, is mentioned on the linked thread above.

    Edited by eafx
    Link to comment
    4 hours ago, eafx said:

    This issue started with 6.8.0-rc1, which updated docker to v19.03.3.

     

    In this & newer docker releases, Docker won't accept multiple '--net' arguments/support connecting to multiple network endpoints. 'Network type: none' already adds the network argument (--net='none') to the docker run command, so when you add --network='container:vpn' or --net='container:vpn' to extra arguments, it doesn't override the 'Network type: none' already specified on the docker template, thus trying to connect to 2 network endpoints.

     

    A workaround to this issue, is mentioned on the linked thread above.

    Neat workaround!

    I tried to edit the docker templates but it kept restoring the network.

     

    It would be easy to provide a way to not print a manual network, like:

    "Network type: manual"

    and the get a textbox to put in your network command.

     

    Anyway, thanks for the solution!

    Link to comment

    The most likely candidate issue is that Docker manages your /etc/resolv.conf inside the container. Generally speaking, when you connect to a VPN, you need to change that. Does your /etc/resolv.conf get updated when your VPN connects liteblue?

    I did play with this image some time ago.

    I do remember getting it working, but I don’t recall if I tested any internally resolvable IPs.

    Cheers!

    Edited by pleinew
    spelling
    Link to comment


    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Restore formatting

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Status Definitions

     

    Open = Under consideration.

     

    Solved = The issue has been resolved.

     

    Solved version = The issue has been resolved in the indicated release version.

     

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

    Retest = Please retest in latest release.


    Priority Definitions

     

    Minor = Something not working correctly.

     

    Urgent = Server crash, data loss, or other showstopper.

     

    Annoyance = Doesn't affect functionality but should be fixed.

     

    Other = Announcement or other non-issue.