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
6.71k stars 331 forks source link

Bug: No port forwarding after reconnection with PIA. #2202

Closed OlivierPelletier closed 1 month ago

OlivierPelletier commented 2 months ago

Is this urgent?

No

Host OS

TrueNAS Scale (TrueNAS-23.10.1.3)

CPU arch

x86_64

VPN service provider

Private Internet Access

What are you using to run the container

Kubernetes

What is the version of Gluetun

Running version v3.38.0 built on 2024-03-25T15:53:33.983Z (commit b3ceece)

What's the problem 🤔

I'm using PIA with portforward enabled for some P2P with qbittorrent. Everything works great. But at the some point, gluetun looses connection, drops the port forward and try to reconnect. Which is normal behavior, everything is fine there. After reconnection, VPN starts working again, but the port forward is never established again.

I would assume it should reconnect to a new port or the same port, but it doesn't. Is it a bug?

Share your logs (at least 10 lines)

2024-04-03T12:47:20-04:00 INFO [healthcheck] healthy!
2024-04-03T12:47:20-04:00 INFO [ip getter] Public IP address is 173.XXX.XX.XX (Australia, South Australia, Adelaide)
2024-04-03T12:47:21-04:00 INFO [vpn] You are running the latest release v3.38.0
2024-04-03T12:47:21-04:00 INFO [port forwarding] starting
2024-04-03T12:47:23-04:00 INFO [port forwarding] Port forwarded data expires in 62 days
2024-04-03T12:47:23-04:00 INFO [port forwarding] port forwarded is 4XXXX
2024-04-03T12:47:23-04:00 INFO [firewall] setting allowed input port 4XXXX through interface tun0...
2024-04-03T12:47:23-04:00 INFO [port forwarding] writing port file /tmp/gluetun/forwarded_port
2024-04-03T12:55:37-04:00 INFO [updater] updating Private Internet Access servers...
2024-04-03T13:14:48-04:00 INFO [healthcheck] program has been unhealthy for 6s: restarting VPN
2024-04-03T13:14:48-04:00 INFO [healthcheck] 👉 See https://github.com/qdm12/gluetun-wiki/blob/main/faq/healthcheck.md
2024-04-03T13:14:48-04:00 INFO [healthcheck] DO NOT OPEN AN ISSUE UNLESS YOU READ AND TRIED EACH POSSIBLE SOLUTION
2024-04-03T13:14:48-04:00 INFO [vpn] stopping
2024-04-03T13:14:48-04:00 INFO [port forwarding] stopping
2024-04-03T13:14:48-04:00 INFO [firewall] removing allowed port 4XXXX...
2024-04-03T13:14:48-04:00 INFO [port forwarding] removing port file /tmp/gluetun/forwarded_port

Share your configuration

qbittorrent-vpn:
  Container ID:    containerd://8e721bf664e982c8ceda91104bc9710b05c71a25fef3cbfd65cf59daf023e9bf
  Image:           tccr.io/tccr/gluetun:v3.38.0@sha256:1c93687d1ba957252d11c29a741d56f3dca3765dbe666ed8595e71816e964452
  Image ID:        tccr.io/tccr/gluetun@sha256:1c93687d1ba957252d11c29a741d56f3dca3765dbe666ed8595e71816e964452
  Port:            <none>
  Host Port:       <none>
  SeccompProfile:  RuntimeDefault
  State:           Running
    Started:       Wed, 03 Apr 2024 12:47:16 -0400
  Ready:           True
  Restart Count:   0
  Limits:
    cpu:     4
    memory:  8Gi
  Requests:
    cpu:     10m
    memory:  50Mi
  Environment:
    TZ:                            America/Montreal
    UMASK:                         0022
    UMASK_SET:                     0022
    NVIDIA_VISIBLE_DEVICES:        void
    PUID:                          568
    USER_ID:                       568
    UID:                           568
    PGID:                          568
    GROUP_ID:                      568
    GID:                           568
    DNS_KEEP_NAMESERVER:           on
    DOT:                           off
    FIREWALL:                      on
    FIREWALL_OUTBOUND_SUBNETS:     172.16.0.0/16,172.17.0.0/16,192.168.1.0/24
    HTTP_CONTROL_SERVER_LOG:       off
    OPENVPN_PASSWORD:              ###############
    OPENVPN_USER:                  ###############
    PORT_FORWARD_ONLY:             true
    VPN_PORT_FORWARDING:           on
    VPN_PORT_FORWARDING_PROVIDER:  private internet access
    VPN_SERVICE_PROVIDER:          private internet access
github-actions[bot] commented 2 months ago

@qdm12 is more or less the only maintainer of this project and works on it in his free time. Please:

qdm12 commented 2 months ago

I would assume it should reconnect to a new port or the same port, but it doesn't. Is it a bug?

Well, it was a bug, and I thought it was fixed, but maybe it's not. Does it happen systematically on an internal VPN restart?

qdm12 commented 1 month ago

Please subscribe to #2069 (and ideally try https://github.com/qdm12/gluetun/issues/2069#issuecomment-2103258071)

Closing this since it looks like a duplicate issue to #2069

github-actions[bot] commented 1 month ago

Closed issues are NOT monitored, so commenting here is likely to be not seen. If you think this is still unresolved and have more information to bring, please create another issue.

This is an automated comment setup because @qdm12 is the sole maintainer of this project which became too popular to monitor issues closed.