haugene / vpn-configs-contrib

A collection of configs for various VPN providers
GNU General Public License v3.0
180 stars 744 forks source link

Failed to acquire new auth token #132

Closed guidorugo closed 1 year ago

guidorugo commented 2 years ago

Is there a pinned issue for this?

Is there an existing or similar issue/discussion for this?

Is there any comment in the documentation for this?

Is this related to a provider?

Are you using the latest release?

Have you tried using the dev branch latest?

Docker run config used

docker run -d --name='Transmission_VPN' \
--net='bridge' \
--privileged=true \
-e TZ="Who_cares" \
-e HOST_OS="Unraid" \
-e HOST_HOSTNAME="Tower" \
-e HOST_CONTAINERNAME="Transmission_VPN" \
-e 'OPENVPN_USERNAME'='Some_random_user' \
-e 'OPENVPN_PASSWORD'=Nothing_to_see_here \
-e 'OPENVPN_CONFIG'='italy' \
-e 'OPENVPN_PROVIDER'='PIA' \
-e 'LOCAL_NETWORK'='10.0.0.0/24' \
-e 'TRANSMISSION_RPC_USERNAME'='home' \
-e 'TRANSMISSION_RPC_PASSWORD'=Neither_here \
-e 'OPENVPN_OPTS'='--inactive 3600 --ping 10 --ping-exit 60 --mute-replay-warnings' \
-e 'PUID'='99' -e 'PGID'='100' \
-e 'TRANSMISSION_DOWNLOAD_DIR'='/data/complete' \
-e 'TRANSMISSION_RPC_AUTHENTICATION_REQUIRED'='true' \
-e 'TRANSMISSION_RATIO_LIMIT_ENABLED'='true' \
-e 'TRANSMISSION_DOWNLOAD_QUEUE_SIZE'='15' \
-e 'TRANSMISSION_CACHE_SIZE_MB'='10' \
-e 'TRANSMISSION_INCOMPLETE_DIR'='/incomplete' \
-e 'TRANSMISSION_WEB_UI'='transmission-web-control' \
-e 'GLOBAL_APPLY_PERMISSIONS'='true' \
-e 'WEBPROXY_ENABLED'='false' \
-e 'PIA_OPENVPN_CONFIG_BUNDLE'='openvpn-tcp' \
-l net.unraid.docker.managed=dockerman \
-l net.unraid.docker.webui='http://[IP]:[PORT:9091]/' \
-l net.unraid.docker.icon='https://raw.githubusercontent.com/activ/docker-templates/master/activ/images/transmission-icon.png' \
-p '9091:9091/tcp' \
-v '/mnt/user/Downloads/Torrents/':'/data':'rw' \
-v '/mnt/user/Downloads/Torrents/complete/':'/downloads':'rw' \
-v '/mnt/user/Downloads/Torrents/watch/':'/data/watch':'rw' \
-v '/mnt/user/Downloads/Torrents/':'/mnt/user/T_Media/Torrent/':'rw' \
-v '/mnt/user/Downloads/Torrents/incomplete/':'/data/incomplete/':'rw' \
--cap-add=NET_ADMIN \
--restart=always \
--log-opt max-size=50m \
--log-driver json-file \
--dns 8.8.8.8 \
--dns 1.1.1.1 \
'haugene/transmission-openvpn:latest'

Current Behavior

Could not connect to any tracker, so neither downloads nor uploads do anything.

Expected Behavior

Connected to trackers normaly.

How have you tried to solve the problem?

Tried with both latest and dev. Tried changing the country for PIA to connect to. Tried local and public DNSs. Tried removing image and re-downloading it. Tried in different server.

Log output

Starting container with revision: 901c0d2def15fcbd2e2cde2bddd1799678e85a31
Creating TUN device /dev/net/tun
mknod: /dev/net/tun: File exists
Using OpenVPN provider: PIA
Running with VPN_CONFIG_SOURCE auto
Provider PIA has a bundled setup script. Defaulting to internal config
Executing setup script for PIA
Downloading OpenVPN config bundle openvpn-tcp into temporary file /tmp/tmp.54VmmYL3Yy
Extract OpenVPN config bundle into PIA directory /etc/openvpn/pia
Starting OpenVPN using config italy.ovpn
Modifying /etc/openvpn/pia/italy.ovpn for best behaviour in this container
Modification: Point auth-user-pass option to the username/password file
Modification: Change ca certificate path
Modification: Change ping options
Modification: Update/set resolv-retry to 15 seconds
Modification: Change tls-crypt keyfile path
Modification: Set output verbosity to 3
Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop
Setting OpenVPN credentials...
adding route to local network 10.0.0.0/24 via 172.17.0.1 dev eth0
Fri Aug 26 12:04:17 2022 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Mar 22 2022
Fri Aug 26 12:04:17 2022 library versions: OpenSSL 1.1.1f  31 Mar 2020, LZO 2.10
Fri Aug 26 12:04:17 2022 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Fri Aug 26 12:04:17 2022 TCP/UDP: Preserving recently used remote address: [AF_INET]<IP>:502
Fri Aug 26 12:04:17 2022 Socket Buffers: R=[87380->87380] S=[65536->65536]
Fri Aug 26 12:04:17 2022 Attempting to establish TCP connection with [AF_INET]<IP>:502 [nonblock]
Fri Aug 26 12:04:18 2022 TCP connection established with [AF_INET]<IP>:502
Fri Aug 26 12:04:18 2022 TCP_CLIENT link local: (not bound)
Fri Aug 26 12:04:18 2022 TCP_CLIENT link remote: [AF_INET]<IP>:502
Fri Aug 26 12:04:18 2022 TLS: Initial packet from [AF_INET]<IP>:502, sid=f9f3b631 23a43536
Fri Aug 26 12:04:18 2022 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Fri Aug 26 12:04:19 2022 VERIFY OK: depth=1, C=US, ST=CA, L=LosAngeles, O=Private Internet Access, OU=Private Internet Access, CN=Private Internet Access, name=Private Internet Access, emailAddress=secure@privateinternetaccess.com
Fri Aug 26 12:04:19 2022 VERIFY KU OK
Fri Aug 26 12:04:19 2022 Validating certificate extended key usage
Fri Aug 26 12:04:19 2022 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Fri Aug 26 12:04:19 2022 VERIFY EKU OK
Fri Aug 26 12:04:19 2022 VERIFY OK: depth=0, C=US, ST=CA, L=LosAngeles, O=Private Internet Access, OU=Private Internet Access, CN=milano402, name=milano402
Fri Aug 26 12:04:19 2022 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, 2048 bit RSA
Fri Aug 26 12:04:19 2022 [milano402] Peer Connection Initiated with [AF_INET]<IP>:502
Fri Aug 26 12:04:20 2022 SENT CONTROL [milano402]: 'PUSH_REQUEST' (status=1)
Fri Aug 26 12:04:20 2022 PUSH: Received control message: 'PUSH_REPLY,comp-lzo no,redirect-gateway def1,route-ipv6 2000::/3,dhcp-option DNS 10.0.0.243,route-gateway <IP>,topology subnet,ping 10,ping-restart 60,ifconfig <IP>255.255.255.0,peer-id 0,cipher AES-128-GCM'
Fri Aug 26 12:04:20 2022 OPTIONS IMPORT: timers and/or timeouts modified
Fri Aug 26 12:04:20 2022 OPTIONS IMPORT: compression parms modified
Fri Aug 26 12:04:20 2022 OPTIONS IMPORT: --ifconfig/up options modified
Fri Aug 26 12:04:20 2022 OPTIONS IMPORT: route options modified
Fri Aug 26 12:04:20 2022 OPTIONS IMPORT: route-related options modified
Fri Aug 26 12:04:20 2022 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Fri Aug 26 12:04:20 2022 OPTIONS IMPORT: peer-id set
Fri Aug 26 12:04:20 2022 OPTIONS IMPORT: adjusting link_mtu to 1627
Fri Aug 26 12:04:20 2022 OPTIONS IMPORT: data channel crypto options modified
Fri Aug 26 12:04:20 2022 Data Channel: using negotiated cipher 'AES-128-GCM'
Fri Aug 26 12:04:20 2022 Outgoing Data Channel: Cipher 'AES-128-GCM' initialized with 128 bit key
Fri Aug 26 12:04:20 2022 Incoming Data Channel: Cipher 'AES-128-GCM' initialized with 128 bit key
Fri Aug 26 12:04:20 2022 ROUTE_GATEWAY 172.17.0.1/255.255.0.0 IFACE=eth0 HWADDR=02:42:ac:11:00:02
Fri Aug 26 12:04:20 2022 GDG6: remote_host_ipv6=n/a
Fri Aug 26 12:04:20 2022 ROUTE6: default_gateway=UNDEF
Fri Aug 26 12:04:20 2022 OpenVPN ROUTE6: OpenVPN needs a gateway parameter for a --route-ipv6 option and no default was specified by either --route-ipv6-gateway or --ifconfig-ipv6 options
Fri Aug 26 12:04:20 2022 OpenVPN ROUTE: failed to parse/resolve route for host/network: 2000::/3
Fri Aug 26 12:04:20 2022 TUN/TAP device tun0 opened
Fri Aug 26 12:04:20 2022 TUN/TAP TX queue length set to 100
Fri Aug 26 12:04:20 2022 /sbin/ip link set dev tun0 up mtu 1500
Fri Aug 26 12:04:20 2022 /sbin/ip addr add dev tun0 <IP>/24 broadcast 10.18.111.255
Fri Aug 26 12:04:20 2022 /etc/openvpn/tunnelUp.sh tun0 1500 1555 <IP> 255.255.255.0 init
Up script executed with tun0 1500 1555 <IP> 255.255.255.0 init
Updating TRANSMISSION_BIND_ADDRESS_IPV4 to the ip of tun0 : <IP>
Using Transmission Web Control UI, overriding TRANSMISSION_WEB_HOME
Updating Transmission settings.json with values from env variables
Using existing settings.json for Transmission /data/transmission-home/settings.json
Overriding bind-address-ipv4 because TRANSMISSION_BIND_ADDRESS_IPV4 is set to <IP>
Overriding cache-size-mb because TRANSMISSION_CACHE_SIZE_MB is set to 10
Overriding download-dir because TRANSMISSION_DOWNLOAD_DIR is set to /data/complete
Overriding download-queue-size because TRANSMISSION_DOWNLOAD_QUEUE_SIZE is set to 15
Overriding incomplete-dir because TRANSMISSION_INCOMPLETE_DIR is set to /incomplete
Overriding ratio-limit-enabled because TRANSMISSION_RATIO_LIMIT_ENABLED is set to true
Overriding rpc-authentication-required because TRANSMISSION_RPC_AUTHENTICATION_REQUIRED is set to true
Overriding rpc-password because TRANSMISSION_RPC_PASSWORD is set to [REDACTED]
Overriding rpc-port because TRANSMISSION_RPC_PORT is set to 9091
Overriding rpc-username because TRANSMISSION_RPC_USERNAME is set to home
Overriding watch-dir because TRANSMISSION_WATCH_DIR is set to /data/watch
sed'ing True to true
Enforcing ownership on transmission config directories
Applying permissions to transmission config directories
Setting owner for transmission paths to 99:100
Setting permissions for download and incomplete directories
Mask: 002
Directories: 775
Files: 664
Setting permission for watch directory (775) and its files (664)

-------------------------------------
Transmission will run as
-------------------------------------
User name:   abc
User uid:    99
User gid:    100
-------------------------------------

STARTING TRANSMISSION
Provider PIA has a script for automatic port forwarding. Will run it now.
If you want to disable this, set environment variable DISABLE_PORT_UPDATER=true
Transmission startup script complete.
Fri Aug 26 12:04:27 2022 /sbin/ip route add <IP>/32 via 172.17.0.1
Fri Aug 26 12:04:27 2022 /sbin/ip route add 0.0.0.0/1 via 10.18.111.1
Fri Aug 26 12:04:27 2022 /sbin/ip route add 128.0.0.0/1 via 10.18.111.1
Fri Aug 26 12:04:27 2022 WARNING: OpenVPN was configured to add an IPv6 route over tun0. However, no IPv6 has been configured for this interface, therefore the route installation may fail or may not work as expected.
Fri Aug 26 12:04:27 2022 Initialization Sequence Completed
Running functions for token based port fowarding
jq: error (at <stdin>:1): Cannot index number with string "token"
parse error: Invalid numeric literal at line 1, column 13
Failed to acquire new auth token

HW/SW Environment

root@Tower:~# cat /etc/os-release 
NAME=Slackware
VERSION="15.0"
ID=slackware
VERSION_ID=15.0
PRETTY_NAME="Slackware 15.0 x86_64"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:slackware:slackware_linux:15.0"
HOME_URL="http://slackware.com/"
SUPPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"
BUG_REPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"
VERSION_CODENAME=stable

root@Tower:~# docker -v
Docker version 20.10.14, build a224086

Anything else?

No response

pkishino commented 2 years ago

This looks like an issue with PIA script

guidorugo commented 2 years ago

This looks like an issue with PIA script

Changed my password to avoid special characters and it worked.