qdm12 / gluetun

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.
https://hub.docker.com/r/qmcgaw/gluetun
MIT License
8.04k stars 372 forks source link

Bug: Port forwarding loop crashed; leads to container restart and connected containers loosing the connection #1904

Closed Lokilicious closed 1 year ago

Lokilicious commented 1 year ago

Is this urgent?

No

Host OS

No response

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 πŸ€”

After some time the gluetun restarts the container which leads to connected containers loosing connection to it.

Log lines before the crash:

2023-10-07T19:09:52.488046190Z 2023-10-07T19:09:52Z ERROR [vpn] stopping port forwarding: interface not set
2023-10-07T19:09:52.488339588Z 2023-10-07T19:09:52Z ERROR [vpn] cannot get version information: Get "https://api.github.com/repos/qdm12/gluetun/commits": context canceled
2023-10-07T19:09:52.488373148Z 2023-10-07T19:09:52Z INFO [port forwarding] starting
2023-10-07T19:09:52.489392539Z 2023-10-07T19:09:52Z ERROR port forwarding loop crashed: starting new service: port forwarding for the first time: getting external IPv4 address: executing remote procedure call: writing to connection: write udp 172.24.0.4:39967->10.2.0.1:5351: write: operation not permitted
2023-10-07T19:09:52.489464409Z 2023-10-07T19:09:52Z ERROR [ip getter] Get "https://ipinfo.io/": dial tcp: lookup ipinfo.io on 1.1.1.1:53: write udp 172.24.0.4:53959->1.1.1.1:53: write: operation not permitted - retrying in 5s
2023-10-07T19:09:52.489483717Z 2023-10-07T19:09:52Z ERROR [vpn] port forwarding for the first time: getting external IPv4 address: executing remote procedure call: writing to connection: write udp 172.24.0.4:39967->10.2.0.1:5351: write: operation not permitted

This happens mostly after a couple of hours of everything running fine, then at some point it crashes.

Share your logs (at least 10 lines)

2023-10-07T19:09:43.987375299Z ========================================
2023-10-07T19:09:43.987400175Z ========================================
2023-10-07T19:09:43.987402741Z =============== gluetun ================
2023-10-07T19:09:43.987404666Z ========================================
2023-10-07T19:09:43.987406566Z =========== Made with ❀️ by ============
2023-10-07T19:09:43.987408797Z ======= https://github.com/qdm12 =======
2023-10-07T19:09:43.987417598Z ========================================
2023-10-07T19:09:43.987419541Z ========================================
2023-10-07T19:09:43.987421326Z 
2023-10-07T19:09:43.987423194Z Running version latest built on 2023-09-28T14:05:11.407Z (commit d4df872)
2023-10-07T19:09:43.987425019Z 
2023-10-07T19:09:43.987426762Z πŸ”§ Need help? https://github.com/qdm12/gluetun/discussions/new
2023-10-07T19:09:43.987428571Z πŸ› Bug? https://github.com/qdm12/gluetun/issues/new
2023-10-07T19:09:43.987430334Z ✨ New feature? https://github.com/qdm12/gluetun/issues/new
2023-10-07T19:09:43.987432152Z β˜• Discussion? https://github.com/qdm12/gluetun/discussions/new
2023-10-07T19:09:43.987433963Z πŸ’» Email? quentin.mcgaw@gmail.com
2023-10-07T19:09:43.987435733Z πŸ’° Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
2023-10-07T19:09:43.987789178Z 2023-10-07T19:09:43Z INFO [routing] default route found: interface eth0, gateway 172.24.0.1, assigned IP 172.24.0.4 and family v4
2023-10-07T19:09:43.987817439Z 2023-10-07T19:09:43Z INFO [routing] local ethernet link found: eth0
2023-10-07T19:09:43.987885100Z 2023-10-07T19:09:43Z INFO [routing] local ipnet found: 172.24.0.0/24
2023-10-07T19:09:43.993165042Z 2023-10-07T19:09:43Z INFO [firewall] enabling...
2023-10-07T19:09:44.054704771Z 2023-10-07T19:09:44Z INFO [firewall] enabled successfully
2023-10-07T19:09:44.402506579Z 2023-10-07T19:09:44Z INFO [storage] merging by most recent 17689 hardcoded servers and 17689 servers read from /gluetun/servers.json
2023-10-07T19:09:44.473557706Z 2023-10-07T19:09:44Z INFO Alpine version: 3.18.3
2023-10-07T19:09:44.475257367Z 2023-10-07T19:09:44Z INFO OpenVPN 2.5 version: 2.5.8
2023-10-07T19:09:44.476906985Z 2023-10-07T19:09:44Z INFO OpenVPN 2.6 version: 2.6.5
2023-10-07T19:09:44.477683617Z 2023-10-07T19:09:44Z INFO Unbound version: 1.17.1
2023-10-07T19:09:44.478164187Z 2023-10-07T19:09:44Z INFO IPtables version: v1.8.9
2023-10-07T19:09:44.478242369Z 2023-10-07T19:09:44Z INFO Settings summary:
2023-10-07T19:09:44.478247472Z β”œβ”€β”€ VPN settings:
2023-10-07T19:09:44.478250046Z |   β”œβ”€β”€ VPN provider settings:
2023-10-07T19:09:44.478251901Z |   |   β”œβ”€β”€ Name: custom
2023-10-07T19:09:44.478253708Z |   |   β”œβ”€β”€ Server selection settings:
2023-10-07T19:09:44.478255515Z |   |   |   β”œβ”€β”€ VPN type: wireguard
2023-10-07T19:09:44.478257374Z |   |   |   β”œβ”€β”€ Target IP address: 190.2.146.180
2023-10-07T19:09:44.478259181Z |   |   |   └── Wireguard selection settings:
2023-10-07T19:09:44.478260976Z |   |   |       β”œβ”€β”€ Endpoint IP address: 190.2.146.180
2023-10-07T19:09:44.478262799Z |   |   |       β”œβ”€β”€ Endpoint port: 51820
2023-10-07T19:09:44.478264601Z |   |   |       └── Server public key: EbxfUNJudEt6J4xL0kHH57eQM+P+OvypYxG4rpzE8iw=
2023-10-07T19:09:44.478273037Z |   |   └── Automatic port forwarding settings:
2023-10-07T19:09:44.478275003Z |   |       β”œβ”€β”€ Use code for provider: protonvpn
2023-10-07T19:09:44.478276804Z |   |       └── Forwarded port file path: /tmp/gluetun/forwarded_port
2023-10-07T19:09:44.478288335Z |   └── Wireguard settings:
2023-10-07T19:09:44.478290164Z |       β”œβ”€β”€ Private key: UBH...Uc=
2023-10-07T19:09:44.478291933Z |       β”œβ”€β”€ Interface addresses:
2023-10-07T19:09:44.478293676Z |       |   └── 10.2.0.2/32
2023-10-07T19:09:44.478295458Z |       β”œβ”€β”€ Allowed IPs:
2023-10-07T19:09:44.478297254Z |       |   β”œβ”€β”€ 0.0.0.0/0
2023-10-07T19:09:44.478299230Z |       |   └── ::/0
2023-10-07T19:09:44.478301885Z |       └── Network interface: tun0
2023-10-07T19:09:44.478304787Z |           └── MTU: 1400
2023-10-07T19:09:44.478307499Z β”œβ”€β”€ DNS settings:
2023-10-07T19:09:44.478309308Z |   β”œβ”€β”€ Keep existing nameserver(s): no
2023-10-07T19:09:44.478311081Z |   β”œβ”€β”€ DNS server address to use: 127.0.0.1
2023-10-07T19:09:44.478312873Z |   └── DNS over TLS settings:
2023-10-07T19:09:44.478314587Z |       β”œβ”€β”€ Enabled: yes
2023-10-07T19:09:44.478316317Z |       β”œβ”€β”€ Update period: every 24h0m0s
2023-10-07T19:09:44.478318037Z |       β”œβ”€β”€ Unbound settings:
2023-10-07T19:09:44.478319784Z |       |   β”œβ”€β”€ Authoritative servers:
2023-10-07T19:09:44.478321521Z |       |   |   └── cloudflare
2023-10-07T19:09:44.478323532Z |       |   β”œβ”€β”€ Caching: yes
2023-10-07T19:09:44.478325242Z |       |   β”œβ”€β”€ IPv6: no
2023-10-07T19:09:44.478326956Z |       |   β”œβ”€β”€ Verbosity level: 1
2023-10-07T19:09:44.478328703Z |       |   β”œβ”€β”€ Verbosity details level: 0
2023-10-07T19:09:44.478330459Z |       |   β”œβ”€β”€ Validation log level: 0
2023-10-07T19:09:44.478332218Z |       |   β”œβ”€β”€ System user: root
2023-10-07T19:09:44.478336022Z |       |   └── Allowed networks:
2023-10-07T19:09:44.478337811Z |       |       β”œβ”€β”€ 0.0.0.0/0
2023-10-07T19:09:44.478339581Z |       |       └── ::/0
2023-10-07T19:09:44.478341304Z |       └── DNS filtering settings:
2023-10-07T19:09:44.478343040Z |           β”œβ”€β”€ Block malicious: yes
2023-10-07T19:09:44.478344770Z |           β”œβ”€β”€ Block ads: no
2023-10-07T19:09:44.478346511Z |           β”œβ”€β”€ Block surveillance: no
2023-10-07T19:09:44.478348228Z |           └── Blocked IP networks:
2023-10-07T19:09:44.478349965Z |               β”œβ”€β”€ 127.0.0.1/8
2023-10-07T19:09:44.478351680Z |               β”œβ”€β”€ 10.0.0.0/8
2023-10-07T19:09:44.478356490Z |               β”œβ”€β”€ 172.16.0.0/12
2023-10-07T19:09:44.478358472Z |               β”œβ”€β”€ 192.168.0.0/16
2023-10-07T19:09:44.478360206Z |               β”œβ”€β”€ 169.254.0.0/16
2023-10-07T19:09:44.478361940Z |               β”œβ”€β”€ ::1/128
2023-10-07T19:09:44.478363656Z |               β”œβ”€β”€ fc00::/7
2023-10-07T19:09:44.478365378Z |               β”œβ”€β”€ fe80::/10
2023-10-07T19:09:44.478367124Z |               β”œβ”€β”€ ::ffff:127.0.0.1/104
2023-10-07T19:09:44.478368848Z |               β”œβ”€β”€ ::ffff:10.0.0.0/104
2023-10-07T19:09:44.478370582Z |               β”œβ”€β”€ ::ffff:169.254.0.0/112
2023-10-07T19:09:44.478372331Z |               β”œβ”€β”€ ::ffff:172.16.0.0/108
2023-10-07T19:09:44.478374063Z |               └── ::ffff:192.168.0.0/112
2023-10-07T19:09:44.478375808Z β”œβ”€β”€ Firewall settings:
2023-10-07T19:09:44.478377847Z |   β”œβ”€β”€ Enabled: yes
2023-10-07T19:09:44.478380403Z |   β”œβ”€β”€ Input ports:
2023-10-07T19:09:44.478382933Z |   |   └── 8080
2023-10-07T19:09:44.478385467Z |   └── Outbound subnets:
2023-10-07T19:09:44.478387997Z |       └── 192.168.178.0/24
2023-10-07T19:09:44.478390562Z β”œβ”€β”€ Log settings:
2023-10-07T19:09:44.478393101Z |   └── Log level: INFO
2023-10-07T19:09:44.478395682Z β”œβ”€β”€ Health settings:
2023-10-07T19:09:44.478398771Z |   β”œβ”€β”€ Server listening address: 127.0.0.1:9999
2023-10-07T19:09:44.478401276Z |   β”œβ”€β”€ Target address: cloudflare.com:443
2023-10-07T19:09:44.478403885Z |   β”œβ”€β”€ Duration to wait after success: 5s
2023-10-07T19:09:44.478406558Z |   β”œβ”€β”€ Read header timeout: 100ms
2023-10-07T19:09:44.478408991Z |   β”œβ”€β”€ Read timeout: 500ms
2023-10-07T19:09:44.478411533Z |   └── VPN wait durations:
2023-10-07T19:09:44.478414013Z |       β”œβ”€β”€ Initial duration: 6s
2023-10-07T19:09:44.478416538Z |       └── Additional duration: 5s
2023-10-07T19:09:44.478419177Z β”œβ”€β”€ Shadowsocks server settings:
2023-10-07T19:09:44.478421794Z |   └── Enabled: no
2023-10-07T19:09:44.478424267Z β”œβ”€β”€ HTTP proxy settings:
2023-10-07T19:09:44.478426876Z |   └── Enabled: no
2023-10-07T19:09:44.478429339Z β”œβ”€β”€ Control server settings:
2023-10-07T19:09:44.478431878Z |   β”œβ”€β”€ Listening address: :8000
2023-10-07T19:09:44.478434373Z |   └── Logging: yes
2023-10-07T19:09:44.478437067Z β”œβ”€β”€ OS Alpine settings:
2023-10-07T19:09:44.478439620Z |   β”œβ”€β”€ Process UID: 1000
2023-10-07T19:09:44.478442142Z |   └── Process GID: 100
2023-10-07T19:09:44.478444912Z β”œβ”€β”€ Public IP settings:
2023-10-07T19:09:44.478450404Z |   β”œβ”€β”€ Fetching: every 12h0m0s
2023-10-07T19:09:44.478453119Z |   └── IP file path: /tmp/gluetun/ip
2023-10-07T19:09:44.478455670Z └── Version settings:
2023-10-07T19:09:44.478458277Z     └── Enabled: yes
2023-10-07T19:09:44.478463488Z 2023-10-07T19:09:44Z INFO [routing] default route found: interface eth0, gateway 172.24.0.1, assigned IP 172.24.0.4 and family v4
2023-10-07T19:09:44.478510981Z 2023-10-07T19:09:44Z INFO [routing] adding route for 0.0.0.0/0
2023-10-07T19:09:44.478563687Z 2023-10-07T19:09:44Z INFO [firewall] setting allowed subnets...
2023-10-07T19:09:44.479204005Z 2023-10-07T19:09:44Z INFO [routing] default route found: interface eth0, gateway 172.24.0.1, assigned IP 172.24.0.4 and family v4
2023-10-07T19:09:44.479222831Z 2023-10-07T19:09:44Z INFO [routing] adding route for 192.168.178.0/24
2023-10-07T19:09:44.479386008Z 2023-10-07T19:09:44Z INFO TUN device is not available: open /dev/net/tun: no such file or directory; creating it...
2023-10-07T19:09:44.479402555Z 2023-10-07T19:09:44Z INFO [firewall] setting allowed input port 8080 through interface eth0...
2023-10-07T19:09:44.482168005Z 2023-10-07T19:09:44Z INFO [dns] using plaintext DNS at address 1.1.1.1
2023-10-07T19:09:44.482268244Z 2023-10-07T19:09:44Z INFO [http server] http server listening on [::]:8000
2023-10-07T19:09:44.482310224Z 2023-10-07T19:09:44Z INFO [firewall] allowing VPN connection...
2023-10-07T19:09:44.482324577Z 2023-10-07T19:09:44Z INFO [healthcheck] listening on 127.0.0.1:9999
2023-10-07T19:09:44.484059982Z 2023-10-07T19:09:44Z INFO [wireguard] Using available kernelspace implementation
2023-10-07T19:09:44.484419913Z 2023-10-07T19:09:44Z INFO [wireguard] Connecting to 190.2.146.180:51820
2023-10-07T19:09:44.484608462Z 2023-10-07T19:09:44Z 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.
2023-10-07T19:09:44.585109299Z 2023-10-07T19:09:44Z INFO [dns] downloading DNS over TLS cryptographic files
2023-10-07T19:09:52.487894489Z 2023-10-07T19:09:52Z INFO [healthcheck] program has been unhealthy for 6s: restarting VPN (see https://github.com/qdm12/gluetun-wiki/blob/main/faq/healthcheck.md)
2023-10-07T19:09:52.487963764Z 2023-10-07T19:09:52Z INFO [vpn] stopping
2023-10-07T19:09:52.488046190Z 2023-10-07T19:09:52Z ERROR [vpn] stopping port forwarding: interface not set
2023-10-07T19:09:52.488339588Z 2023-10-07T19:09:52Z ERROR [vpn] cannot get version information: Get "https://api.github.com/repos/qdm12/gluetun/commits": context canceled
2023-10-07T19:09:52.488373148Z 2023-10-07T19:09:52Z INFO [port forwarding] starting
2023-10-07T19:09:52.489392539Z 2023-10-07T19:09:52Z ERROR port forwarding loop crashed: starting new service: port forwarding for the first time: getting external IPv4 address: executing remote procedure call: writing to connection: write udp 172.24.0.4:39967->10.2.0.1:5351: write: operation not permitted
2023-10-07T19:09:52.489464409Z 2023-10-07T19:09:52Z ERROR [ip getter] Get "https://ipinfo.io/": dial tcp: lookup ipinfo.io on 1.1.1.1:53: write udp 172.24.0.4:53959->1.1.1.1:53: write: operation not permitted - retrying in 5s
2023-10-07T19:09:52.489483717Z 2023-10-07T19:09:52Z ERROR [vpn] port forwarding for the first time: getting external IPv4 address: executing remote procedure call: writing to connection: write udp 172.24.0.4:39967->10.2.0.1:5351: write: operation not permitted
2023-10-07T19:09:52.489500367Z 2023-10-07T19:09:52Z INFO dns ticker: terminated βœ”οΈ
2023-10-07T19:09:52.489523032Z 2023-10-07T19:09:52Z INFO updater ticker: terminated βœ”οΈ
2023-10-07T19:09:52.489534486Z 2023-10-07T19:09:52Z INFO http server: terminated βœ”οΈ
2023-10-07T19:09:52.489543357Z 2023-10-07T19:09:52Z INFO control: terminated βœ”οΈ
2023-10-07T19:09:52.489595438Z 2023-10-07T19:09:52Z INFO updater: terminated βœ”οΈ
2023-10-07T19:09:52.489625805Z 2023-10-07T19:09:52Z INFO tickers: terminated βœ”οΈ
2023-10-07T19:09:52.489780509Z 2023-10-07T19:09:52Z INFO HTTP health server: terminated βœ”οΈ
2023-10-07T19:09:53.490429605Z 2023-10-07T19:09:53Z WARN vpn: goroutine shutdown timed out: after 1s ⚠️
2023-10-07T19:09:53.490480859Z 2023-10-07T19:09:53Z INFO shadowsocks proxy: terminated βœ”οΈ
2023-10-07T19:09:53.490492914Z 2023-10-07T19:09:53Z INFO http proxy: terminated βœ”οΈ
2023-10-07T19:09:53.490501592Z 2023-10-07T19:09:53Z INFO unbound: terminated βœ”οΈ
2023-10-07T19:09:53.490509585Z 2023-10-07T19:09:53Z INFO other: terminated βœ”οΈ
2023-10-07T19:09:53.490524473Z 2023-10-07T19:09:53Z INFO [routing] routing cleanup...
2023-10-07T19:09:53.491104058Z 2023-10-07T19:09:53Z INFO [routing] default route found: interface eth0, gateway 172.24.0.1, assigned IP 172.24.0.4 and family v4
2023-10-07T19:09:53.491144895Z 2023-10-07T19:09:53Z INFO [routing] deleting route for 0.0.0.0/0
2023-10-07T19:09:53.491483643Z 2023-10-07T19:09:53Z INFO [routing] deleting route for 192.168.178.0/24
2023-10-07T19:09:53.491878665Z 2023-10-07T19:09:53Z ERROR ordered shutdown timed out: vpn: goroutine shutdown timed out: after 1s
2023-10-07T19:09:53.491923838Z 2023-10-07T19:09:53Z INFO Shutdown successful
2023-10-07T19:10:06.815317892Z ========================================
2023-10-07T19:10:06.815339007Z ========================================
2023-10-07T19:10:06.815341873Z =============== gluetun ================
2023-10-07T19:10:06.815344311Z ========================================
2023-10-07T19:10:06.815346425Z =========== Made with ❀️ by ============
2023-10-07T19:10:06.815349030Z ======= https://github.com/qdm12 =======
2023-10-07T19:10:06.815351218Z ========================================
2023-10-07T19:10:06.815353424Z ========================================
2023-10-07T19:10:06.815355562Z 
2023-10-07T19:10:06.815357746Z Running version latest built on 2023-09-28T14:05:11.407Z (commit d4df872)
2023-10-07T19:10:06.815367278Z 
2023-10-07T19:10:06.815369596Z πŸ”§ Need help? https://github.com/qdm12/gluetun/discussions/new
2023-10-07T19:10:06.815372083Z πŸ› Bug? https://github.com/qdm12/gluetun/issues/new
2023-10-07T19:10:06.815374261Z ✨ New feature? https://github.com/qdm12/gluetun/issues/new
2023-10-07T19:10:06.815376399Z β˜• Discussion? https://github.com/qdm12/gluetun/discussions/new
2023-10-07T19:10:06.815378538Z πŸ’» Email? quentin.mcgaw@gmail.com
2023-10-07T19:10:06.815380686Z πŸ’° Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
2023-10-07T19:10:06.815728676Z 2023-10-07T19:10:06Z INFO [routing] default route found: interface eth0, gateway 172.24.0.1, assigned IP 172.24.0.4 and family v4
2023-10-07T19:10:06.815772561Z 2023-10-07T19:10:06Z INFO [routing] local ethernet link found: eth0
2023-10-07T19:10:06.815805203Z 2023-10-07T19:10:06Z INFO [routing] local ipnet found: 172.24.0.0/24
2023-10-07T19:10:06.821885523Z 2023-10-07T19:10:06Z INFO [firewall] enabling...
2023-10-07T19:10:06.894969474Z 2023-10-07T19:10:06Z INFO [firewall] enabled successfully
2023-10-07T19:10:07.262768519Z 2023-10-07T19:10:07Z INFO [storage] merging by most recent 17689 hardcoded servers and 17689 servers read from /gluetun/servers.json
2023-10-07T19:10:07.332386154Z 2023-10-07T19:10:07Z INFO Alpine version: 3.18.3
2023-10-07T19:10:07.334050365Z 2023-10-07T19:10:07Z INFO OpenVPN 2.5 version: 2.5.8
2023-10-07T19:10:07.335622308Z 2023-10-07T19:10:07Z INFO OpenVPN 2.6 version: 2.6.5
2023-10-07T19:10:07.336489153Z 2023-10-07T19:10:07Z INFO Unbound version: 1.17.1
2023-10-07T19:10:07.336885318Z 2023-10-07T19:10:07Z INFO IPtables version: v1.8.9
2023-10-07T19:10:07.337049437Z 2023-10-07T19:10:07Z INFO Settings summary:
2023-10-07T19:10:07.337057283Z β”œβ”€β”€ VPN settings:
2023-10-07T19:10:07.337060192Z |   β”œβ”€β”€ VPN provider settings:
2023-10-07T19:10:07.337062117Z |   |   β”œβ”€β”€ Name: custom
2023-10-07T19:10:07.337063943Z |   |   β”œβ”€β”€ Server selection settings:
2023-10-07T19:10:07.337065709Z |   |   |   β”œβ”€β”€ VPN type: wireguard
2023-10-07T19:10:07.337067482Z |   |   |   β”œβ”€β”€ Target IP address: 190.2.146.180
2023-10-07T19:10:07.337069417Z |   |   |   └── Wireguard selection settings:
2023-10-07T19:10:07.337071193Z |   |   |       β”œβ”€β”€ Endpoint IP address: 190.2.146.180
2023-10-07T19:10:07.337073000Z |   |   |       β”œβ”€β”€ Endpoint port: 51820
2023-10-07T19:10:07.337074851Z |   |   |       └── Server public key: EbxfUNJudEt6J4xL0kHH57eQM+P+OvypYxG4rpzE8iw=
2023-10-07T19:10:07.337076675Z |   |   └── Automatic port forwarding settings:
2023-10-07T19:10:07.337078407Z |   |       β”œβ”€β”€ Use code for provider: protonvpn
2023-10-07T19:10:07.337080163Z |   |       └── Forwarded port file path: /tmp/gluetun/forwarded_port
2023-10-07T19:10:07.337081960Z |   └── Wireguard settings:
2023-10-07T19:10:07.337090761Z |       β”œβ”€β”€ Private key: UBH...Uc=
2023-10-07T19:10:07.337092707Z |       β”œβ”€β”€ Interface addresses:
2023-10-07T19:10:07.337094432Z |       |   └── 10.2.0.2/32
2023-10-07T19:10:07.337096153Z |       β”œβ”€β”€ Allowed IPs:
2023-10-07T19:10:07.337097866Z |       |   β”œβ”€β”€ 0.0.0.0/0
2023-10-07T19:10:07.337099587Z |       |   └── ::/0
2023-10-07T19:10:07.337101294Z |       └── Network interface: tun0
2023-10-07T19:10:07.337103021Z |           └── MTU: 1400
2023-10-07T19:10:07.337104755Z β”œβ”€β”€ DNS settings:
2023-10-07T19:10:07.337106532Z |   β”œβ”€β”€ Keep existing nameserver(s): no
2023-10-07T19:10:07.337108256Z |   β”œβ”€β”€ DNS server address to use: 127.0.0.1
2023-10-07T19:10:07.337109976Z |   └── DNS over TLS settings:
2023-10-07T19:10:07.337111697Z |       β”œβ”€β”€ Enabled: yes
2023-10-07T19:10:07.337113421Z |       β”œβ”€β”€ Update period: every 24h0m0s
2023-10-07T19:10:07.337115152Z |       β”œβ”€β”€ Unbound settings:
2023-10-07T19:10:07.337116893Z |       |   β”œβ”€β”€ Authoritative servers:
2023-10-07T19:10:07.337118636Z |       |   |   └── cloudflare
2023-10-07T19:10:07.337120344Z |       |   β”œβ”€β”€ Caching: yes
2023-10-07T19:10:07.337122075Z |       |   β”œβ”€β”€ IPv6: no
2023-10-07T19:10:07.337123773Z |       |   β”œβ”€β”€ Verbosity level: 1
2023-10-07T19:10:07.337125480Z |       |   β”œβ”€β”€ Verbosity details level: 0
2023-10-07T19:10:07.337127228Z |       |   β”œβ”€β”€ Validation log level: 0
2023-10-07T19:10:07.337128919Z |       |   β”œβ”€β”€ System user: root
2023-10-07T19:10:07.337130631Z |       |   └── Allowed networks:
2023-10-07T19:10:07.337132327Z |       |       β”œβ”€β”€ 0.0.0.0/0
2023-10-07T19:10:07.337134030Z |       |       └── ::/0
2023-10-07T19:10:07.337135729Z |       └── DNS filtering settings:
2023-10-07T19:10:07.337137476Z |           β”œβ”€β”€ Block malicious: yes
2023-10-07T19:10:07.337139216Z |           β”œβ”€β”€ Block ads: no
2023-10-07T19:10:07.337140913Z |           β”œβ”€β”€ Block surveillance: no
2023-10-07T19:10:07.337142861Z |           └── Blocked IP networks:
2023-10-07T19:10:07.337144591Z |               β”œβ”€β”€ 127.0.0.1/8
2023-10-07T19:10:07.337146336Z |               β”œβ”€β”€ 10.0.0.0/8
2023-10-07T19:10:07.337148459Z |               β”œβ”€β”€ 172.16.0.0/12
2023-10-07T19:10:07.337150202Z |               β”œβ”€β”€ 192.168.0.0/16
2023-10-07T19:10:07.337151988Z |               β”œβ”€β”€ 169.254.0.0/16
2023-10-07T19:10:07.337153696Z |               β”œβ”€β”€ ::1/128
2023-10-07T19:10:07.337157421Z |               β”œβ”€β”€ fc00::/7
2023-10-07T19:10:07.337159309Z |               β”œβ”€β”€ fe80::/10
2023-10-07T19:10:07.337161048Z |               β”œβ”€β”€ ::ffff:127.0.0.1/104
2023-10-07T19:10:07.337162898Z |               β”œβ”€β”€ ::ffff:10.0.0.0/104
2023-10-07T19:10:07.337164735Z |               β”œβ”€β”€ ::ffff:169.254.0.0/112
2023-10-07T19:10:07.337166482Z |               β”œβ”€β”€ ::ffff:172.16.0.0/108
2023-10-07T19:10:07.337168200Z |               └── ::ffff:192.168.0.0/112
2023-10-07T19:10:07.337169959Z β”œβ”€β”€ Firewall settings:
2023-10-07T19:10:07.337171682Z |   β”œβ”€β”€ Enabled: yes
2023-10-07T19:10:07.337173396Z |   β”œβ”€β”€ Input ports:
2023-10-07T19:10:07.337175070Z |   |   └── 8080
2023-10-07T19:10:07.337176856Z |   └── Outbound subnets:
2023-10-07T19:10:07.337178592Z |       └── 192.168.178.0/24
2023-10-07T19:10:07.337180319Z β”œβ”€β”€ Log settings:
2023-10-07T19:10:07.337182105Z |   └── Log level: INFO
2023-10-07T19:10:07.337183829Z β”œβ”€β”€ Health settings:
2023-10-07T19:10:07.337185543Z |   β”œβ”€β”€ Server listening address: 127.0.0.1:9999
2023-10-07T19:10:07.337187316Z |   β”œβ”€β”€ Target address: cloudflare.com:443
2023-10-07T19:10:07.337189059Z |   β”œβ”€β”€ Duration to wait after success: 5s
2023-10-07T19:10:07.337190864Z |   β”œβ”€β”€ Read header timeout: 100ms
2023-10-07T19:10:07.337192580Z |   β”œβ”€β”€ Read timeout: 500ms
2023-10-07T19:10:07.337194285Z |   └── VPN wait durations:
2023-10-07T19:10:07.337195984Z |       β”œβ”€β”€ Initial duration: 6s
2023-10-07T19:10:07.337197707Z |       └── Additional duration: 5s
2023-10-07T19:10:07.337199428Z β”œβ”€β”€ Shadowsocks server settings:
2023-10-07T19:10:07.337201195Z |   └── Enabled: no
2023-10-07T19:10:07.337202894Z β”œβ”€β”€ HTTP proxy settings:
2023-10-07T19:10:07.337204666Z |   └── Enabled: no
2023-10-07T19:10:07.337206367Z β”œβ”€β”€ Control server settings:
2023-10-07T19:10:07.337208094Z |   β”œβ”€β”€ Listening address: :8000
2023-10-07T19:10:07.337209830Z |   └── Logging: yes
2023-10-07T19:10:07.337211528Z β”œβ”€β”€ OS Alpine settings:
2023-10-07T19:10:07.337213236Z |   β”œβ”€β”€ Process UID: 1000
2023-10-07T19:10:07.337214949Z |   └── Process GID: 100
2023-10-07T19:10:07.337216664Z β”œβ”€β”€ Public IP settings:
2023-10-07T19:10:07.337218408Z |   β”œβ”€β”€ Fetching: every 12h0m0s
2023-10-07T19:10:07.337220122Z |   └── IP file path: /tmp/gluetun/ip
2023-10-07T19:10:07.337221850Z └── Version settings:
2023-10-07T19:10:07.337224067Z     └── Enabled: yes
2023-10-07T19:10:07.337244159Z 2023-10-07T19:10:07Z INFO [routing] default route found: interface eth0, gateway 172.24.0.1, assigned IP 172.24.0.4 and family v4
2023-10-07T19:10:07.337294596Z 2023-10-07T19:10:07Z INFO [routing] adding route for 0.0.0.0/0
2023-10-07T19:10:07.337340874Z 2023-10-07T19:10:07Z INFO [firewall] setting allowed subnets...
2023-10-07T19:10:07.337935870Z 2023-10-07T19:10:07Z INFO [routing] default route found: interface eth0, gateway 172.24.0.1, assigned IP 172.24.0.4 and family v4
2023-10-07T19:10:07.337940748Z 2023-10-07T19:10:07Z INFO [routing] adding route for 192.168.178.0/24
2023-10-07T19:10:07.338061880Z 2023-10-07T19:10:07Z INFO TUN device is not available: open /dev/net/tun: no such file or directory; creating it...
2023-10-07T19:10:07.338078035Z 2023-10-07T19:10:07Z INFO [firewall] setting allowed input port 8080 through interface eth0...
2023-10-07T19:10:07.340909305Z 2023-10-07T19:10:07Z INFO [dns] using plaintext DNS at address 1.1.1.1
2023-10-07T19:10:07.341075366Z 2023-10-07T19:10:07Z INFO [http server] http server listening on [::]:8000
2023-10-07T19:10:07.341178696Z 2023-10-07T19:10:07Z INFO [healthcheck] listening on 127.0.0.1:9999
2023-10-07T19:10:07.341186043Z 2023-10-07T19:10:07Z INFO [firewall] allowing VPN connection...
2023-10-07T19:10:07.342885439Z 2023-10-07T19:10:07Z INFO [wireguard] Using available kernelspace implementation
2023-10-07T19:10:07.343174959Z 2023-10-07T19:10:07Z INFO [wireguard] Connecting to 190.2.146.180:51820
2023-10-07T19:10:07.343344542Z 2023-10-07T19:10:07Z 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.
2023-10-07T19:10:07.443392770Z 2023-10-07T19:10:07Z INFO [dns] downloading DNS over TLS cryptographic files
2023-10-07T19:10:12.802966675Z 2023-10-07T19:10:12Z INFO [healthcheck] healthy!
2023-10-07T19:10:14.005403064Z 2023-10-07T19:10:14Z INFO [http server] 200 GET /ip wrote 17B to 172.24.0.1:52214 in 181.029Β΅s
2023-10-07T19:10:14.248140490Z 2023-10-07T19:10:14Z INFO [dns] downloading hostnames and IP block lists
2023-10-07T19:10:18.471192905Z 2023-10-07T19:10:18Z INFO [dns] init module 0: validator
2023-10-07T19:10:18.471219204Z 2023-10-07T19:10:18Z INFO [dns] init module 1: iterator
2023-10-07T19:10:18.505014300Z 2023-10-07T19:10:18Z INFO [dns] start of service (unbound 1.17.1).
2023-10-07T19:10:18.752328616Z 2023-10-07T19:10:18Z INFO [dns] generate keytag query _ta-4a5c-4f66. NULL IN
2023-10-07T19:10:19.092058578Z 2023-10-07T19:10:19Z INFO [dns] ready
2023-10-07T19:10:19.586680876Z 2023-10-07T19:10:19Z INFO [vpn] You are running 4 commits behind the most recent latest
2023-10-07T19:10:19.586738830Z 2023-10-07T19:10:19Z INFO [port forwarding] starting
2023-10-07T19:10:19.639923487Z 2023-10-07T19:10:19Z INFO [port forwarding] gateway external IPv4 address is 190.2.146.228
2023-10-07T19:10:19.745663679Z 2023-10-07T19:10:19Z INFO [port forwarding] port forwarded is 49443
2023-10-07T19:10:19.745760093Z 2023-10-07T19:10:19Z INFO [firewall] setting allowed input port 49443 through interface tun0...
2023-10-07T19:10:19.756448970Z 2023-10-07T19:10:19Z INFO [port forwarding] writing port file /tmp/gluetun/forwarded_port
2023-10-07T19:10:19.777931709Z 2023-10-07T19:10:19Z INFO [ip getter] Public IP address is 190.2.146.228 (Netherlands, North Holland, Amsterdam)
2023-10-07T19:15:14.005036831Z 2023-10-07T19:15:14Z INFO [http server] 200 GET /ip wrote 272B to 172.24.0.1:53186 in 85.493Β΅s
2023-10-07T19:20:00.812603847Z 2023-10-07T19:20:00Z INFO [http server] 200 GET /portforwarded wrote 15B to 172.24.0.1:53974 in 96.561Β΅s
2023-10-07T19:20:14.005869172Z 2023-10-07T19:20:14Z INFO [http server] 200 GET /ip wrote 272B to 172.24.0.1:54018 in 81.395Β΅s

Share your configuration

version: '3'
services:
  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    environment:
      - PUID=1000
      - PGID=100
      - VPN_TYPE=wireguard
      - VPN_SERVICE_PROVIDER=custom
      - VPN_ENDPOINT_IP=*
      - VPN_ENDPOINT_PORT=51820
      - WIREGUARD_PUBLIC_KEY=*
      - WIREGUARD_PRIVATE_KEY=*
      - WIREGUARD_ADDRESSES=10.2.0.2/32
      - VPN_PORT_FORWARDING=on
      - VPN_PORT_FORWARDING_PROVIDER=protonvpn
      - FIREWALL_OUTBOUND_SUBNETS=192.168.178.0/24
      - FIREWALL_INPUT_PORTS=8080
    restart: unless-stopped
    ports:
      - 5800:5800 #Jdownloader
      - 8080:8080/tcp #qBittorrent
      - 8000:8000 #gluetun
      #- 8989:8989 #sonarr
    networks:
      gluetun_network:
  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Europe/Vienna
      - WEBUI_PORT=8080
    volumes:
      - ./config/qbittorrent:/config
      - /media/storage/downloads/torrent:/downloads
    depends_on:
      gluetun:
        condition: service_healthy
    network_mode: service:gluetun
    restart: unless-stopped
  jdownloader2:
    image: jlesage/jdownloader-2:latest
    container_name: jdownloader2
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Europe/Vienna
    restart: unless-stopped
    volumes:
      - /media/storage/downloads/jdownloader:/output
      - ./config/jdownloader:/config
    network_mode: service:gluetun
    depends_on:
      gluetun:
        condition: service_healthy
  qbittorrent-port-forward-gluetun-server:
    image: mjmeli/qbittorrent-port-forward-gluetun-server
    container_name: qbittorrent-port-forward-gluetun-server
    restart: unless-stopped
    environment:
      - QBT_USERNAME=*
      - QBT_PASSWORD=*
      - QBT_ADDR=http://server:8080
      - GTN_ADDR=http://server:8000
    depends_on:
      gluetun:
        condition: service_healthy
  alpine_empty:
    image: alpine/curl:latest
    container_name: alpine
    command: tail -F anything
    depends_on:
      gluetun:
        condition: service_healthy
    network_mode: service:gluetun
    restart: always

networks:
  gluetun_network:
    external: true
dfadev commented 1 year ago

this happens with PIA port forwarding as well.

basically gluetun shouldn't completely bail when a port forwarding rpc call fails, it should either try more than once or restart the vpn instead of the container in the extreme case.

darkspadez commented 1 year ago

I think this is addressed in the latest image pushed 2 days ago, as I see you are on one from 9/28. I personally do not have this issue with the latest image pushed 2 days ago but could be unrelated. I'd try upgrading to it and see if it still has the issue.

qdm12 commented 1 year ago

Indeed, this got fixed in 1c43a1d55bf38c85651e8a6b74e12026116f1545 Just waiting for port forwarding to be stable (pia + protonvpn) before making a v3.36.0 release, sorry it's taking a bit of time / overdue-ation for it. Closing this πŸ˜‰