Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: No forwarded port being fetched (using PIA) #2710

Closed
joestevens2000 opened this issue Feb 19, 2025 · 4 comments
Closed

Bug: No forwarded port being fetched (using PIA) #2710

joestevens2000 opened this issue Feb 19, 2025 · 4 comments

Comments

@joestevens2000
Copy link

Is this urgent?

No

Host OS

Synology DSM 6.2.4-25556 Update 8

CPU arch

x86_64

VPN service provider

Private Internet Access

What are you using to run the container

docker-compose

What is the version of Gluetun

Running version latest built on 2025-01-22T08:30:14.628Z (commit 13532c8)

What's the problem 🤔

No forwarded port is being grabbed by gluetun. There's no mention of a forwarded port being obtained in the logs, and no port is written to /tmp/gluetun/forwarded_port.
Running ls /tmp/gluetun/ shows the ip file is there, but no other file. cat /tmp/gluetun/ip confirms the IP written to ip is correct.

Since there's no error message in the gluetun logs I'm guessing the error is with gluetun rather than PIA.

I tried explicitly settings VPN_PORT_FORWARDING_STATUS_FILE to both the default directory and to a different directory, but neither produced a file.

Share your logs (at least 10 lines)

========================================
========================================
=============== gluetun ================
========================================
=========== Made with ❤️ by ============
======= https://github.com/qdm12 =======
========================================
========================================
Running version latest built on 2025-01-22T08:30:14.628Z (commit 13532c8)
🔧 Need help? ☕ Discussion? https://github.com/qdm12/gluetun/discussions/new/choose
🐛 Bug? ✨ New feature? https://github.com/qdm12/gluetun/issues/new/choose
💻 Email? quentin.mcgaw@gmail.com
💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
2025-02-19T19:00:54+01:00 INFO [routing] default route found: interface eth0, gateway 172.30.0.1, assigned IP 172.30.0.30 and family v4
2025-02-19T19:00:54+01:00 INFO [routing] local ethernet link found: eth0
2025-02-19T19:00:54+01:00 INFO [routing] local ipnet found: 172.30.0.0/16
2025-02-19T19:00:55+01:00 INFO [firewall] enabling...
2025-02-19T19:00:55+01:00 INFO [firewall] enabled successfully
2025-02-19T19:00:59+01:00 INFO [storage] merging by most recent 20776 hardcoded servers and 20776 servers read from /gluetun/servers.json
2025-02-19T19:01:00+01:00 INFO Alpine version: 3.20.5
2025-02-19T19:01:01+01:00 INFO OpenVPN 2.5 version: 2.5.10
2025-02-19T19:01:01+01:00 INFO OpenVPN 2.6 version: 2.6.11
2025-02-19T19:01:01+01:00 INFO IPtables version: v1.8.10
2025-02-19T19:01:01+01:00 INFO Settings summary:
├── VPN settings:
|   ├── VPN provider settings:
|   |   ├── Name: private internet access
|   |   └── Server selection settings:
|   |       ├── VPN type: openvpn
|   |       ├── Regions: dk copenhagen
|   |       ├── Port forwarding only servers: yes
|   |       └── OpenVPN server selection settings:
|   |           ├── Protocol: UDP
|   |           └── Private Internet Access encryption preset: strong
|   └── OpenVPN settings:
|       ├── OpenVPN version: 2.6
|       ├── User: [set]
|       ├── Password: [set]
|       ├── Private Internet Access encryption preset: strong
|       ├── 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
|       ├── 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
├── 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: yes
|   ├── Listening address: :8888
|   ├── User: 
|   ├── Password: [not set]
|   ├── Stealth mode: yes
|   ├── Log: no
|   ├── Read header timeout: 1s
|   └── Read timeout: 3s
├── Control server settings:
|   ├── Listening address: :8000
|   ├── Logging: yes
|   └── Authentication file path: /gluetun/auth/config.toml
├── Storage settings:
|   └── Filepath: /gluetun/servers.json
├── OS Alpine settings:
|   ├── Process UID: 1000
|   ├── Process GID: 1000
|   └── Timezone: europe/copenhagen
├── Public IP settings:
|   ├── IP file path: /tmp/gluetun/ip
|   ├── Public IP data base API: ipinfo
|   └── Public IP data backup APIs:
|       ├── ifconfigco
|       ├── ip2location
|       └── cloudflare
└── Version settings:
    └── Enabled: yes
2025-02-19T19:01:01+01:00 INFO [routing] default route found: interface eth0, gateway 172.30.0.1, assigned IP 172.30.0.30 and family v4
2025-02-19T19:01:01+01:00 INFO [routing] adding route for 0.0.0.0/0
2025-02-19T19:01:01+01:00 INFO [firewall] setting allowed subnets...
2025-02-19T19:01:01+01:00 INFO [routing] default route found: interface eth0, gateway 172.30.0.1, assigned IP 172.30.0.30 and family v4
2025-02-19T19:01:01+01:00 INFO [dns] using plaintext DNS at address 1.1.1.1
2025-02-19T19:01:01+01:00 INFO [http proxy] listening on :8888
2025-02-19T19:01:01+01:00 INFO [http server] http server listening on [::]:8000
2025-02-19T19:01:01+01:00 INFO [healthcheck] listening on 127.0.0.1:9999
2025-02-19T19:01:01+01:00 INFO [firewall] allowing VPN connection...
2025-02-19T19:01:01+01:00 INFO [openvpn] OpenVPN 2.6.11 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
2025-02-19T19:01:01+01:00 INFO [openvpn] library versions: OpenSSL 3.3.2 3 Sep 2024, LZO 2.10
2025-02-19T19:01:01+01:00 INFO [openvpn] TCP/UDP: Preserving recently used remote address: [AF_INET][PUBLIC-IP]:1197
2025-02-19T19:01:01+01:00 INFO [openvpn] UDPv4 link local: (not bound)
2025-02-19T19:01:01+01:00 INFO [openvpn] UDPv4 link remote: [AF_INET][PUBLIC-IP]:1197
2025-02-19T19:01:01+01:00 INFO [openvpn] [copenhagen404] Peer Connection Initiated with [AF_INET][PUBLIC-IP]:1197
2025-02-19T19:01:01+01:00 INFO [openvpn] TUN/TAP device tun0 opened
2025-02-19T19:01:01+01:00 INFO [openvpn] /sbin/ip link set dev tun0 up mtu 1500
2025-02-19T19:01:02+01:00 INFO [openvpn] /sbin/ip link set dev tun0 up
2025-02-19T19:01:02+01:00 INFO [openvpn] /sbin/ip addr add dev tun0 10.4.110.117/24
2025-02-19T19:01:02+01:00 WARN [openvpn] OpenVPN was configured to add an IPv6 route. However, no IPv6 has been configured for tun0, therefore the route installation may fail or may not work as expected.
2025-02-19T19:01:02+01:00 INFO [openvpn] UID set to nonrootuser
2025-02-19T19:01:02+01:00 INFO [openvpn] Initialization Sequence Completed
2025-02-19T19:01:02+01:00 INFO [dns] downloading hostnames and IP block lists
2025-02-19T19:01:02+01:00 INFO [healthcheck] healthy!
2025-02-19T19:01:07+01:00 INFO [dns] DNS server listening on [::]:53
2025-02-19T19:01:07+01:00 INFO [dns] ready
2025-02-19T19:01:08+01:00 INFO [ip getter] Public IP address is [PUBLIC-IP] (Denmark, Capital Region, Glostrup - source: ipinfo)
2025-02-19T19:01:08+01:00 INFO [vpn] You are running 1 commit behind the most recent latest

Share your configuration

version: '3.8'

services:
  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    hostname: gluetun
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    ports:
      - 6881:6881
      - 6881:6881/udp
    volumes:
      - /volume1/docker/gluetun:/gluetun
    environment:
      # See https://github.com/qdm12/gluetun-wiki/tree/main/setup#setup
      - VPN_SERVICE_PROVIDER=pia
      - VPN_TYPE=openvpn
      - OPENVPN_USER=user
      - OPENVPN_PASSWORD=pass
      - SERVER_REGIONS="DK Copenhagen"
      - PORT_FORWARD_ONLY=true # Select servers with port forwarding only
      - OPENVPN_PORT_FORWARDING=on # Explicitly request port forwarding from PIA
      - VPN_PORT_FORWARDING_STATUS_FILE=/tmp/gluetun/forwarded_port # Default: /tmp/gluetun/forwarded_port
      - HTTPPROXY="on"
      - HTTPPROXY_STEALTH="on"
      - TZ=Europe/Copenhagen
      - UPDATED_PERIOD=24h
    restart: unless-stopped
    networks:
      network1:
        ipv4_address: 172.30.0.30
Copy link
Contributor

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

@CodeSmash44
Copy link

try:
- VPN_PORT_FORWARDING=on
instead of:
- OPENVPN_PORT_FORWARDING=on

@joestevens2000
Copy link
Author

try: - VPN_PORT_FORWARDING=on instead of: - OPENVPN_PORT_FORWARDING=on

You're a wizard Harry! It's always the simplest things that slip through the cracks. Thank you!

Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants