DyonR / docker-qbittorrentvpn

Docker container which runs a qBittorent-nox client with an optional WireGuard or OpenVPN connection
https://hub.docker.com/r/dyonr/qbittorrentvpn/
GNU General Public License v3.0
254 stars 78 forks source link

Can you access webui from local if VPN is enabled? #130

Open Astro03 opened 2 years ago

Astro03 commented 2 years ago

I'm using openvpn settings for a Private Internet Access ovpn file.

When I set VPN_ENABLED=no, I can access the webui from the local network.

When I set VPN_ENABLED=yes, I CANNOT access the webui from the local network. For some reason, when making the http request, the response times out.

In both these scenarios, the qbittorrent is working and i'm still able to download and access it through other means.

Is there a way to access the webui from the local network if the VPN is enabled?

My LAN_NETWORK=192.168.0.0/16

DyonR commented 2 years ago

Are you sure LAN_NETWORK should be /16 instead of /24? Normally if the WebUI in inaccessible with vpn enabled its because of a misconfiguration in the LAN_NETWORK

D1s0rdu8 commented 2 years ago

Could be related #127

Astro03 commented 2 years ago

@DyonR

I have 192.168.X. (docker network) and 192.168.Y. (home network) at my house.

I'm not an expert but i believe 192.168.0.0/16 would cover both X and Y octets.

I'll look into trying the solution in 127 but i think it's already in my ip route table.

Could this be caused by traefik doing reverse routing? It really seems odd that it works when VPN is off but not on. -> Traefik does not cause this since i turned it off and it still doesn't route properly

rodti commented 1 year ago

I have 192.168.X. (docker network) and 192.168.Y. (home network) at my house.

I'm not an expert but i believe 192.168.0.0/16 would cover both X and Y octets.

192.168.0.0/22 should do it, I think.

Could this be caused by traefik doing reverse routing? It really seems odd that it works when VPN is off but not on. -> Traefik does not cause this since i turned it off and it still doesn't route properly

Have you set up forwarding of port 8080:8080 from host to container in Docker? That needs to be in place to connect to the web UI.

comk22 commented 1 year ago

192.168.0.0/22 should do it, I think.

This solved my issue changing from /24 to /22. I can finally go to sleep :)

Astro03 commented 1 year ago

@comk22 ,

1) Is your home network 192.168.0. or 192.168.1. or 192.168.2. or 192.168.3.? (I assume it's not 192.168.0.* since 192.168.0.0/24 did not work for you.) 2) Do you use traefik?

comk22 commented 1 year ago

@comk22 ,

  1. Is your home network 192.168.0. or 192.168.1. or 192.168.2.* or 192.168.3.? (I assume it's not 192.168.0. since 192.168.0.0/24 did not work for you.)
  2. Do you use traefik?

@Astro03 My server is on 192.168.1.107. Still used 192.168.0.0/22 for this qbittorrent application. But I was thinking I could have also configured a normal Wireguard config and just installed qbittorrent nox. It was a bit easier to comprehend what I was doing.

Astro03 commented 1 year ago

@comk22

okay.. so the reason why yours worked was because you local network is on the 1 subnet.

cidr -> range of ip addresses 192.168.0.0/24 -> 192.168.0.0 to 192.168.0.255

Notice how your ip address was not on the lan? By changing the 24 to 22, you basically added your ip address to the lan range.

192.168.0.0/23 -> 192.168.0.0 to 192.168.1.255 192.168.0.0/22 -> 192.168.0.0 to 192.168.3.255