VPN client in a thin Docker container for multiple VPN providers, written in Go, and using OpenVPN or Wireguard, DNS over TLS, with a few proxy servers built-in.
Running version latest built on 2023-09-28T14:05:11.407Z (commit d4df872)
What's the problem π€
Gluetun runs fine with other containers on its network for multiple hours (around 6h, conatainers can communicate with each other on the same docker network, and from outside of the docker network), then the containers on the same network can not be reached anymore.
For example, with qbittorrent, I get this error from the container qbittorrent-port-forward-gluetun-server (2 containers on the same docker network):
curl: (56) Recv failure: Connection reset by peer
Or from swag (accessing qbittorrent's webui with it, so 1 container on another docker network trying to access gluetun's network) :
failed (104: Connection reset by peer) while reading response header from upstream, client: xx.xx.xx.xx, server: qbittorrent.*, request: "GET / HTTP/2.0", upstream:...
I don't know anything about gluetun's code but it sounds like a firewall issue.
Also, from what I see on some trackers' website, it seems like the torrents stop being seeded, not all at once, over multiple hours.
Restarting gluetun (and the other containers) solves the issue
Edit : I restarted the container, it has now been 13h without any issue
Share your logs (at least 10 lines)
========================================
========================================
=============== gluetun ================
========================================
=========== Made with β€οΈ by ============
======= https://github.com/qdm12 =======
========================================
========================================
Running version latest built on 2023-09-28T14:05:11.407Z (commit d4df872)
π§ Need help? https://github.com/qdm12/gluetun/discussions/new
π Bug? https://github.com/qdm12/gluetun/issues/new
β¨ New feature? https://github.com/qdm12/gluetun/issues/new
β Discussion? https://github.com/qdm12/gluetun/discussions/new
π» Email? quentin.mcgaw@gmail.com
π° Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
2023-10-04T15:42:59Z INFO [routing] default route found: interface eth0, gateway 172.19.0.1, assigned IP 172.19.0.6 and family v4
2023-10-04T15:42:59Z INFO [routing] local ethernet link found: eth0
2023-10-04T15:42:59Z INFO [routing] local ipnet found: 172.19.0.0/16
2023-10-04T15:42:59Z INFO [firewall] enabling...
2023-10-04T15:42:59Z INFO [firewall] enabled successfully
2023-10-04T15:43:00Z INFO [storage] merging by most recent 17689 hardcoded servers and 17689 servers read from /gluetun/servers.json
2023-10-04T15:43:00Z INFO Alpine version: 3.18.3
2023-10-04T15:43:00Z INFO OpenVPN 2.5 version: 2.5.8
2023-10-04T15:43:00Z INFO OpenVPN 2.6 version: 2.6.5
2023-10-04T15:43:00Z INFO Unbound version: 1.17.1
2023-10-04T15:43:00Z INFO IPtables version: v1.8.9
2023-10-04T15:43:00Z INFO Settings summary:
βββ VPN settings:
| βββ VPN provider settings:
| | βββ Name: protonvpn
| | βββ Server selection settings:
| | | βββ VPN type: openvpn
| | | βββ Countries: france
| | | βββ OpenVPN server selection settings:
| | | βββ Protocol: TCP
| | βββ Automatic port forwarding settings:
| | βββ Use port forwarding code for current provider
| | βββ Forwarded port file path: /tmp/gluetun/forwarded_port
| βββ OpenVPN settings:
| βββ OpenVPN version: 2.5
| βββ User: Yop...pmp
| βββ Password: 7d...Fh
| βββ Network interface: tun0
| βββ Run OpenVPN as: root
| βββ Verbosity level: 1
βββ 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
| βββ Unbound settings:
| | βββ Authoritative servers:
| | | βββ cloudflare
| | βββ Caching: yes
| | βββ IPv6: no
| | βββ Verbosity level: 1
| | βββ Verbosity details level: 0
| | βββ Validation log level: 0
| | βββ System user: root
| | βββ Allowed networks:
| | βββ 0.0.0.0/0
| | βββ ::/0
| βββ 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
βββ 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: :8001
| βββ Logging: yes
βββ OS Alpine settings:
| βββ Process UID: 1000
| βββ Process GID: 1000
βββ Public IP settings:
| βββ Fetching: every 12h0m0s
| βββ IP file path: /tmp/gluetun/ip
βββ Version settings:
βββ Enabled: yes
2023-10-04T15:43:00Z INFO [routing] default route found: interface eth0, gateway 172.19.0.1, assigned IP 172.19.0.6 and family v4
2023-10-04T15:43:00Z INFO [routing] adding route for 0.0.0.0/0
2023-10-04T15:43:00Z INFO [firewall] setting allowed subnets...
2023-10-04T15:43:00Z INFO [routing] default route found: interface eth0, gateway 172.19.0.1, assigned IP 172.19.0.6 and family v4
2023-10-04T15:43:00Z INFO TUN device is not available: open /dev/net/tun: no such file or directory; creating it...
2023-10-04T15:43:00Z INFO [http server] http server listening on [::]:8001
2023-10-04T15:43:00Z INFO [firewall] allowing VPN connection...
2023-10-04T15:43:00Z INFO [dns] using plaintext DNS at address 1.1.1.1
2023-10-04T15:43:00Z INFO [healthcheck] listening on 127.0.0.1:9999
2023-10-04T15:43:00Z INFO [openvpn] OpenVPN 2.5.8 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Nov 2 2022
2023-10-04T15:43:00Z INFO [openvpn] library versions: OpenSSL 3.1.3 19 Sep 2023, LZO 2.10
2023-10-04T15:43:00Z INFO [openvpn] TCP/UDP: Preserving recently used remote address: [AF_INET]188.241.83.98:443
2023-10-04T15:43:00Z INFO [openvpn] Attempting to establish TCP connection with [AF_INET]188.241.83.98:443 [nonblock]
2023-10-04T15:43:06Z INFO [healthcheck] program has been unhealthy for 6s: restarting VPN (see https://github.com/qdm12/gluetun-wiki/blob/main/faq/healthcheck.md)
2023-10-04T15:43:06Z INFO [vpn] stopping
2023-10-04T15:43:06Z ERROR [vpn] stopping port forwarding: interface not set
2023-10-04T15:43:06Z INFO [vpn] starting
2023-10-04T15:43:06Z INFO [firewall] allowing VPN connection...
2023-10-04T15:43:06Z INFO [openvpn] OpenVPN 2.5.8 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Nov 2 2022
2023-10-04T15:43:06Z INFO [openvpn] library versions: OpenSSL 3.1.3 19 Sep 2023, LZO 2.10
2023-10-04T15:43:06Z INFO [openvpn] TCP/UDP: Preserving recently used remote address: [AF_INET]185.159.157.148:443
2023-10-04T15:43:06Z INFO [openvpn] Attempting to establish TCP connection with [AF_INET]185.159.157.148:443 [nonblock]
2023-10-04T15:43:07Z INFO [openvpn] TCP connection established with [AF_INET]185.159.157.148:443
2023-10-04T15:43:07Z INFO [openvpn] TCP_CLIENT link local: (not bound)
2023-10-04T15:43:07Z INFO [openvpn] TCP_CLIENT link remote: [AF_INET]185.159.157.148:443
2023-10-04T15:43:08Z WARN [openvpn] 'link-mtu' is used inconsistently, local='link-mtu 1635', remote='link-mtu 1636'
2023-10-04T15:43:08Z WARN [openvpn] 'comp-lzo' is present in remote config but missing in local config, remote='comp-lzo'
2023-10-04T15:43:08Z INFO [openvpn] [node-us-220.protonvpn.net] Peer Connection Initiated with [AF_INET]185.159.157.148:443
2023-10-04T15:43:10Z INFO [openvpn] TUN/TAP device tun0 opened
2023-10-04T15:43:10Z INFO [openvpn] /sbin/ip link set dev tun0 up mtu 1500
2023-10-04T15:43:10Z INFO [openvpn] /sbin/ip link set dev tun0 up
2023-10-04T15:43:10Z INFO [openvpn] /sbin/ip addr add dev tun0 10.81.0.7/16
2023-10-04T15:43:10Z INFO [openvpn] UID set to nonrootuser
2023-10-04T15:43:10Z INFO [openvpn] Initialization Sequence Completed
2023-10-04T15:43:10Z INFO [dns] downloading DNS over TLS cryptographic files
2023-10-04T15:43:11Z INFO [healthcheck] healthy!
2023-10-04T15:43:17Z INFO [dns] downloading hostnames and IP block lists
2023-10-04T15:43:24Z INFO [healthcheck] unhealthy: dialing: dial tcp4: lookup cloudflare.com: i/o timeout
2023-10-04T15:43:26Z INFO [dns] init module 0: validator
2023-10-04T15:43:26Z INFO [dns] init module 1: iterator
2023-10-04T15:43:26Z INFO [dns] start of service (unbound 1.17.1).
2023-10-04T15:43:26Z INFO [dns] generate keytag query _ta-4a5c-4f66. NULL IN
2023-10-04T15:43:26Z INFO [dns] generate keytag query _ta-4a5c-4f66. NULL IN
2023-10-04T15:43:28Z INFO [dns] ready
2023-10-04T15:43:28Z INFO [healthcheck] healthy!
2023-10-04T15:43:29Z INFO [vpn] You are running on the bleeding edge of latest!
2023-10-04T15:43:29Z INFO [port forwarding] starting
2023-10-04T15:43:29Z INFO [port forwarding] gateway external IPv4 address is 154.47.25.201
2023-10-04T15:43:29Z INFO [port forwarding] port forwarded is 63279
2023-10-04T15:43:29Z INFO [firewall] setting allowed input port 63279 through interface tun0...
2023-10-04T15:43:29Z INFO [port forwarding] writing port file /tmp/gluetun/forwarded_port
2023-10-04T15:43:29Z INFO [ip getter] Public IP address is 154.47.25.201 (United States, Illinois, Chicago)
2023-10-04T15:50:00Z INFO [http server] 200 GET /portforwarded wrote 15B to 172.19.0.1:44086 in 74.956Β΅s
2023-10-04T16:00:00Z INFO [http server] 200 GET /portforwarded wrote 15B to 172.19.0.1:46238 in 15.782Β΅s
Is this urgent?
None
Host OS
Debian 12
CPU arch
x86_64
VPN service provider
ProtonVPN
What are you using to run the container
docker-compose
What is the version of Gluetun
Running version latest built on 2023-09-28T14:05:11.407Z (commit d4df872)
What's the problem π€
Gluetun runs fine with other containers on its network for multiple hours (around 6h, conatainers can communicate with each other on the same docker network, and from outside of the docker network), then the containers on the same network can not be reached anymore.
For example, with qbittorrent, I get this error from the container
qbittorrent-port-forward-gluetun-server
(2 containers on the same docker network):curl: (56) Recv failure: Connection reset by peer
Or from swag (accessing qbittorrent's webui with it, so 1 container on another docker network trying to access gluetun's network) :
failed (104: Connection reset by peer) while reading response header from upstream, client: xx.xx.xx.xx, server: qbittorrent.*, request: "GET / HTTP/2.0", upstream:...
I don't know anything about gluetun's code but it sounds like a firewall issue.
Also, from what I see on some trackers' website, it seems like the torrents stop being seeded, not all at once, over multiple hours.
Restarting gluetun (and the other containers) solves the issue
Edit : I restarted the container, it has now been 13h without any issue
Share your logs (at least 10 lines)
Share your configuration