gluetun
gluetun copied to clipboard
Bug: qbittorrent works with `"container:gluetun"` but not with `"service:gluetun"`
Is this urgent?
No
Host OS
Ubuntu Server 22.04
CPU arch
x86_64
VPN service provider
Windscribe
What are you using to run the container
Portainer
What is the version of Gluetun
Running version latest built on 2024-08-25T07:04:32.409Z (commit 01fa993)
What's the problem π€
As per the wiki, containers defined in the same compose/stack should be connected to gluetun via network_mode: "service:gluetun". When done this way, qBittorrent does not work: It cannot connect to any tracker, does not find peers, etc. and will just complain that everything is unreachable. I can ping the outside world fine from within the qb container, though.
When I separate the qb part from the same stack into a new one and only change the network mode to network_mode: "container:gluetun", it works just fine.
Edit: This is so weird, sometimes it just works with both containers in one stack. I can't see any difference in the logs, though. I'll start the exact same compose and suddenly it just works. After another restart of the stack, it won't work any more, except sometimes it will. Again, ping always works from within the qb container, which seems even weirder.
Share your logs (at least 10 lines)
========================================
========================================
=============== gluetun ================
========================================
=========== Made with β€οΈ by ============
======= https://github.com/qdm12 =======
========================================
========================================
Running version latest built on 2024-08-25T07:04:32.409Z (commit 01fa993)
π§ Need help? β Discussion? https://github.com/qdm12/gluetun/discussions/new/choose
π Bug? β¨ New feature? https://github.com/qdm12/gluetun/issues/new/choose
π» Email? [email protected]
π° Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
2024-09-01T03:58:19+02:00 INFO [routing] default route found: interface eth0, gateway 172.18.0.1, assigned IP 172.18.0.7 and family v4
2024-09-01T03:58:19+02:00 INFO [routing] local ethernet link found: eth0
2024-09-01T03:58:19+02:00 INFO [routing] local ipnet found: 172.18.0.0/16
2024-09-01T03:58:19+02:00 INFO [firewall] enabling...
2024-09-01T03:58:19+02:00 INFO [firewall] enabled successfully
2024-09-01T03:58:19+02:00 INFO [storage] creating /gluetun/servers.json with 20480 hardcoded servers
2024-09-01T03:58:20+02:00 INFO Alpine version: 3.20.2
2024-09-01T03:58:20+02:00 INFO OpenVPN 2.5 version: 2.5.10
2024-09-01T03:58:20+02:00 INFO OpenVPN 2.6 version: 2.6.11
2024-09-01T03:58:20+02:00 INFO IPtables version: v1.8.10
2024-09-01T03:58:20+02:00 INFO Settings summary:
βββ VPN settings:
| βββ VPN provider settings:
| | βββ Name: windscribe
| | βββ Server selection settings:
| | βββ VPN type: wireguard
| | βββ Regions: Switzerland
| | βββ Wireguard selection settings:
| βββ Wireguard settings:
| βββ Private key: 2KA...lM=
| βββ Pre-shared key: GUD...rE=
| βββ Interface addresses:
| | βββ ###############
| βββ Allowed IPs:
| | βββ 0.0.0.0/0
| | βββ ::/0
| βββ Network interface: tun0
| βββ MTU: 1400
βββ DNS settings:
| βββ Keep existing nameserver(s): no
| βββ DNS server address to use: 127.0.0.1
| βββ DNS over TLS settings:
| βββ Enabled: yes
| βββ Update period: every 24h0m0s
| βββ Upstream resolvers:
| | βββ cloudflare
| βββ Caching: yes
| βββ IPv6: no
| βββ DNS filtering settings:
| βββ Block malicious: yes
| βββ Block ads: no
| βββ Block surveillance: no
| βββ Blocked IP networks:
| βββ 127.0.0.1/8
| βββ 10.0.0.0/8
| βββ 172.16.0.0/12
| βββ 192.168.0.0/16
| βββ 169.254.0.0/16
| βββ ::1/128
| βββ fc00::/7
| βββ fe80::/10
| βββ ::ffff:127.0.0.1/104
| βββ ::ffff:10.0.0.0/104
| βββ ::ffff:169.254.0.0/112
| βββ ::ffff:172.16.0.0/108
| βββ ::ffff:192.168.0.0/112
βββ Firewall settings:
| βββ Enabled: yes
| βββ VPN input ports:
| βββ 10288
βββ Log settings:
| βββ Log level: info
βββ Health settings:
| βββ Server listening address: 127.0.0.1:9999
| βββ Target address: cloudflare.com:443
| βββ Duration to wait after success: 5s
| βββ Read header timeout: 100ms
| βββ Read timeout: 500ms
| βββ VPN wait durations:
| βββ Initial duration: 6s
| βββ Additional duration: 5s
βββ Shadowsocks server settings:
| βββ Enabled: no
βββ HTTP proxy settings:
| βββ Enabled: no
βββ Control server settings:
| βββ Listening address: :8000
| βββ Logging: yes
βββ Storage settings:
| βββ Filepath: /gluetun/servers.json
βββ OS Alpine settings:
| βββ Process UID: 1000
| βββ Process GID: 1000
| βββ Timezone: Europe/Berlin
βββ Public IP settings:
| βββ Fetching: every 12h0m0s
| βββ IP file path: /tmp/gluetun/ip
| βββ Public IP data API: ipinfo
| βββ API token: [set]
βββ Server data updater settings:
| βββ Update period: 24h0m0s
| βββ DNS address: 1.1.1.1:53
| βββ Minimum ratio: 0.8
| βββ Providers to update: windscribe
βββ Version settings:
βββ Enabled: yes
2024-09-01T03:58:20+02:00 INFO [routing] default route found: interface eth0, gateway 172.18.0.1, assigned IP 172.18.0.7 and family v4
2024-09-01T03:58:20+02:00 INFO [routing] adding route for 0.0.0.0/0
2024-09-01T03:58:20+02:00 INFO [firewall] setting allowed subnets...
2024-09-01T03:58:20+02:00 INFO [routing] default route found: interface eth0, gateway 172.18.0.1, assigned IP 172.18.0.7 and family v4
2024-09-01T03:58:20+02:00 INFO TUN device is not available: open /dev/net/tun: no such file or directory; creating it...
2024-09-01T03:58:20+02:00 INFO [dns] using plaintext DNS at address 1.1.1.1
2024-09-01T03:58:20+02:00 INFO [http server] http server listening on [::]:8000
2024-09-01T03:58:20+02:00 INFO [healthcheck] listening on 127.0.0.1:9999
2024-09-01T03:58:20+02:00 INFO [firewall] allowing VPN connection...
2024-09-01T03:58:20+02:00 INFO [wireguard] Using available kernelspace implementation
2024-09-01T03:58:20+02:00 INFO [wireguard] Connecting to 89.187.165.99:1194
2024-09-01T03:58:20+02:00 INFO [wireguard] Wireguard setup is complete. Note Wireguard is a silent protocol and it may or may not work, without giving any error message. Typically i/o timeout errors indicate the Wireguard connection is not working.
2024-09-01T03:58:20+02:00 INFO [firewall] setting allowed input port 10288 through interface tun0...
2024-09-01T03:58:20+02:00 INFO [dns] downloading hostnames and IP block lists
2024-09-01T03:58:20+02:00 INFO [healthcheck] healthy!
2024-09-01T03:58:21+02:00 INFO [dns] DNS server listening on [::]:53
2024-09-01T03:58:22+02:00 INFO [dns] ready
2024-09-01T03:58:22+02:00 INFO [ip getter] Public IP address is 89.187.165.119 (Switzerland, Zurich, ZΓΌrich)
2024-09-01T03:58:22+02:00 INFO [vpn] You are running 1 commit behind the most recent latest
Share your configuration
# Environment Variable: forward_port_value -> Windscribe MATCHING port forward!
services:
gluetun:
image: ghcr.io/qdm12/gluetun
container_name: gluetun
restart: unless-stopped
cap_add:
- NET_ADMIN
ports:
- 8082:8082/tcp # qB WebUI
environment:
- FIREWALL_VPN_INPUT_PORTS=${forward_port_value} # port forward
- VPN_SERVICE_PROVIDER=windscribe
- VPN_TYPE=wireguard
- WIREGUARD_PRIVATE_KEY=###############
- WIREGUARD_ADDRESSES=###############
- WIREGUARD_PRESHARED_KEY=###############
- SERVER_REGIONS=Switzerland
- TZ=Europe/Berlin
- UPDATER_PERIOD=24h
- PUBLICIP_API=ipinfo
- PUBLICIP_API_TOKEN=###############
qbittorrent:
image: lscr.io/linuxserver/qbittorrent:latest
container_name: qbittorrent
network_mode: "service:gluetun"
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
- WEBUI_PORT=8082
- TORRENTING_PORT=${forward_port_value}
volumes:
- /home/docker-data/qbittorrent/appdata:/config
- /home/docker-data/qbittorrent/downloads:/downloads #optional
restart: unless-stopped
healthcheck:
test: ["CMD", "ping", "-c", "1", "1.1.1.1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
default:
external: true
name: reverse-proxied