Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

PIA port forwarding doesn't update over time #99

Open
snowlucas opened this issue Nov 7, 2021 · 1 comment
Open

PIA port forwarding doesn't update over time #99

snowlucas opened this issue Nov 7, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@snowlucas
Copy link

Information

When I start with Docker-compose using PIA as my provider I get some errors with CURL but I do get a connection and I do get an open port with port forwarding setup automatically. Within an hour the port is no longer open. The project haugene/docker-transmission-openvpn appears to check the port every 15 mins and opens a new one with PIA if closed. 15 mins appears to be the PIA standard. This project doesnt seem to have the check and update feature but this might be an issue with my setup and the curl errors I'm getting?

"curl: (3) URL using bad/illegal format or missing URL"

qbittorrent | 2021-11-06 23:27:52 TCP/UDP: Preserving recently used remote address: [AF_INET]212.102.36.171:1198
qbittorrent | 2021-11-06 23:27:52 UDP link local: (not bound)
qbittorrent | 2021-11-06 23:27:52 UDP link remote: [AF_INET]212.102.36.171:1198
qbittorrent | 2021-11-06 23:27:52 [zurich408] Peer Connection Initiated with [AF_INET]212.102.36.171:1198
qbittorrent | 2021-11-06 23:27:52 WARNING: You have specified redirect-gateway and redirect-private at the same time (or the same option multiple times). This is not well supported and may lead to unexpected results
qbittorrent | 2021-11-06 23:27:52 sitnl_send: rtnl: generic error (-101): Network unreachable
qbittorrent | 2021-11-06 23:27:52 TUN/TAP device tun1 opened
qbittorrent | 2021-11-06 23:27:52 /usr/sbin/ip-su link set dev tun1 up mtu 1500
qbittorrent | 2021-11-06 23:27:52 /usr/sbin/ip-su link set dev tun1 up
qbittorrent | 2021-11-06 23:27:52 /usr/sbin/ip-su addr add dev tun1 10.5.112.164/24
qbittorrent | 2021-11-06 23:27:52 WARNING: OpenVPN was configured to add an IPv6 route. However, no IPv6 has been configured for tun1, therefore the route installation may fail or may not work as expected.
qbittorrent | 2021-11-06 23:27:52 add_route_ipv6(2000::/3 -> :: metric -1) dev tun1
qbittorrent | 2021-11-06 23:27:52 Initialization Sequence Completed
qbittorrent | INFO: configuring port forwarding for PIA
qbittorrent |
qbittorrent |
qbittorrent |
qbittorrent | curl: (3) URL using bad/illegal format or missing URL
qbittorrent | port is 22763
qbittorrent | curl: (3) URL using bad/illegal format or missing URL
qbittorrent | the port has been bound to 22763 Sat Nov 6 23:27:56 GMT 2021
qbittorrent | Got new port 22763 from PIA
qbittorrent |
qbittorrent | ******** Information ********
qbittorrent | To control qBittorrent, access the Web UI at http://localhost:8222

Current setup

Docker from image: guillaumedsde/qbittorrent-openvpn:latest

docker-compose.yml file

version: "3"
services:
  qbittorrent:
    image: guillaumedsde/alpine-qbittorrent-openvpn:latest
    volumes:
      - /media/downloads:/media/downloads
      - ${APPDATA}/qbittorrent/config:/config
      - ${APPDATA}/qbittorrent/scripts:/scripts
      - /etc/localtime:/etc/localtime:ro
    environment:
      - QBT_WEBUI_PORT=8222
      - OPENVPN_PROVIDER=PIA
      - OPENVPN_CONFIG=switzerland
      - OPENVPN_USERNAME=1234
      - OPENVPN_PASSWORD=5678
      - PUID=1000
      - PGID=1000
      - LAN=192.168.0.0/16
    ports:
      - 8222:8222
    cap_add:
      - NET_ADMIN
    restart: unless-stopped

Attempted Fix(es)

Searched here and found a reference to the curl: (3) URL using bad/illegal format or missing URL but no real fix.
I've tried running the pia port update script from inside the container with the same error.

@snowlucas snowlucas added the bug Something isn't working label Nov 7, 2021
@dn4hc
Copy link
Contributor

dn4hc commented Nov 15, 2021

Seems like a keep alive needs to be send every 15 mins to retain the port forward otherwise the api drops it.
https://github.com/pia-foss/manual-connections/blob/master/port_forwarding.sh

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants