Docker container on Linux doesn't see the tunnel created by my OpenVPN client

Hello,

I’m unsure where to post, I’ll explain my issue. I installed qBitTorrent-NoX, a headless version of qBitTorrent as a Docker container, on a Linux arm32v7 QNAP NAS. I set up the container using the Container Station interface. I also set up an OpenVPN client on this NAS. The VPN client successfully creates a tun2002 network adapter, as seen here:

# ifconfig
br0       Link encap:Ethernet  HWaddr 24:5E:BE:20:57:76
          inet addr:192.168.1.4  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8318921 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4732129 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:22139440237 (20.6 GiB)  TX bytes:36664351863 (34.1 GiB)

docker0   Link encap:Ethernet  HWaddr 02:7A:DE:ED:93:DB
          inet addr:10.0.5.1  Bcast:10.0.5.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10901 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:1432435 (1.3 MiB)

eth0      Link encap:Ethernet  HWaddr 24:5E:BE:20:57:76
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:22556838 errors:1 dropped:26 overruns:0 frame:2
          TX packets:28603091 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1789041070 (1.6 GiB)  TX bytes:3721245899 (3.4 GiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%1979061460/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:804703 errors:0 dropped:0 overruns:0 frame:0
          TX packets:804703 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:173325563 (165.2 MiB)  TX bytes:173325563 (165.2 MiB)

lxcbr0    Link encap:Ethernet  HWaddr D2:AC:BC:9E:CB:B7
          inet addr:10.0.3.1  Bcast:10.0.3.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10900 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:1432321 (1.3 MiB)

tun2002   Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:10.10.112.210  P-t-P:10.10.112.210  Mask:255.255.255.0
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:185712 errors:0 dropped:0 overruns:0 frame:0
          TX packets:224997 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:35398167 (33.7 MiB)  TX bytes:26301677 (25.0 MiB)

veth79f   Link encap:Ethernet  HWaddr EE:F7:C7:00:39:61
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6586 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12772 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2926446 (2.7 MiB)  TX bytes:6509247 (6.2 MiB)

veth873   Link encap:Ethernet  HWaddr C6:78:50:BC:84:9F
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:58126 errors:0 dropped:0 overruns:0 frame:0
          TX packets:641138 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:472665689 (450.7 MiB)  TX bytes:578887723 (552.0 MiB)

However, when I try to bind qBitTorrent-NoX to the network interface of the VPN client, qBitTorrent-NoX only displays 2 NICs: the loopback and the physical NIC of the NAS: https://ibb.co/BVpJJRyZ
Do you think the problem may come from Docker?

Thank you.

Let me start with the probably not so obvious: this forum is not a support channel for QNAP’s Docker version that is bundled with Container Station. It is a community support channel for distros/architectures listed in the supported platforms matrix and the offerings from the Docker Inc ecosystem, like Docker Desktop, Docker Hub, Docker Scout…

Furthermore, this topic is quite special and might have side effects introduced by the environment (only QNAP users will know how Container Station deviates from vanilla Docker and what Container Station interfaces are). Please be aware that it might take a while until a user using the exact setup is seeing your post and might answer your post. It might even happen that the post does not get a useful response at all.

You can try to provide more information, so that people get an idea of how the containers are created/configured, what images are used to create the containers. Maybe knowing docker mechanics and your used configuration might lead to a solution, maybe it doesn’t.

Someone who works with containers in their job will never have touched the combination of OpenVPN and qBitTorrent. At least I didn’t, and I have been working with containers in enterprise context for roughly 9 years now, and 11 in general.

Thank you Metin.