Trigus42 / alpine-qbittorrentvpn

Multiarch docker image with the latest qBittorrent-nox client (WEB UI) and WireGuard/OpenVPN tunnel
GNU General Public License v3.0
69 stars 10 forks source link

Can't Access WebUI within specified local network #13

Closed davidfrickert closed 2 years ago

davidfrickert commented 2 years ago

Hey. Thanks for publishing this docker image for multiple archs. Trying it out on my raspbery pi 4 aarch64.

I'm having issues acessing WebUI within the specified local network

docker-compose.yml:

version: "3.7"
services:
  qbittorrent:
    image: trigus42/qbittorrentvpn
    container_name: qbittorrent
    cap_add:
      - NET_ADMIN
    environment:
      - PUID=948
      - PGID=948
      - UMASK=003
      - VPN_ENABLED=yes
      - VPN_TYPE=openvpn
      - LAN_NETWORK=192.168.0.0/24
    volumes:
      - ./config:/config
      - /media/hdd/Media/.torrents/qB/1:/downloads
    ports:
      - 6111:6111
      - 6111:6111/udp
      - 8080:8080
    restart: unless-stopped

I got no errors on docker logs... I got this on the 03-network script which seems to be the one that should do the magic to allow local net access:

[cont-init.d] 03-network: executing...
2022-01-16 17:48:50 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
2022-01-16 17:48:50 Initialization Sequence Completed
2022-01-16 17:48:50 [INFO] Docker network defined as 172.31.0.0/16
2022-01-16 17:48:50 [INFO] Adding 192.168.0.0/24 as route via docker eth0
[cont-init.d] 03-network: exited 0.

Any idea on why I can't access WebUI?

Trigus42 commented 2 years ago

Can you post a screenshot of the error you get in your browser when you are trying to access the WEB UI?

davidfrickert commented 2 years ago

Yeah no problem @Trigus42 ! I get this:

imagem

Trigus42 commented 2 years ago

You defined the subnet your clients are on as 192.168.0.0/24. While it's certainly not uncommon to have more than one subnet in your LAN, could it be that either LAN_NETWORK=192.168.0.0/24 or the IP you entered in your client's browser is wrong?

davidfrickert commented 2 years ago

Humm maybe? I don't think so. The IP is definitely correct as i've got it in static IP. The LAN network I also think it's correct:

Output from my PC:

 inet 192.168.1.12/24 brd 192.168.1.255 scope global dynamic

Output from raspberry pi (where the container is):

 inet 192.168.1.100/24 brd 192.168.1.255 scope global eth0

I've also tried setting LAN_NETWORK=192.168.1.0/24, same result

Trigus42 commented 2 years ago

Maybe try LAN_NETWORK=192.168.1.0/16 and don't forget to recreate the container (docker-compose up -d). Just restarting won't do.

You can check if the route is working by bashing into the container using docker exec -it qbittorrent bash and pinging your PC (ping 192.168.1.12)

davidfrickert commented 2 years ago

Well, I went around and checked how I could enable iptables mangle and now it works! It seems that maybe without that part, the webUI will never be acessible?

I essentially just did sudo modprobe xt_mark iptable_mangle on my host, recriated the container, and now it's accessible. (Using LAN_NETWORK=192.168.1.0/24, which seems to be the correct subnet)

Trigus42 commented 2 years ago

It should work without SET_FWMARK but if that works for you, that's great

davidfrickert commented 2 years ago

Ehhhh.... I can access the page but it's clearly missing alot of information, such as the torrents, download / upload speeds etc.. I guess I'll just keep using flood for webui instead of using the qbittorrent included webui

davidfrickert commented 2 years ago

imagem

davidfrickert commented 2 years ago

Ah. I now know why it wasn't working. I was using a port that wasn't 8080. And changed back to it, that's why it started working (even if it still doesn't fully work as the webui is unusable sadly)