-
Notifications
You must be signed in to change notification settings - Fork 169
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
port_forwarding.sh curl gives "Unauthorized client" error #162
Comments
I am seeing the same thing like this:
But I am utterly confused by the docs on the parameters
Did you find any way around this, @jvs3 ? |
Where this
then results in
|
I am still getting this unauthorized client error. Any update on how you fixed it? |
@theflyingsquirrel88 using the scripts as is seems to work for some reason. |
Holy smokes. I got it working now.
The trick was that the HTH |
Seems like the port forwarding request needs to be sent to the internal IP of the servers, not the external. You can get that IP from the payload of the call in the respective connect_*.sh. For wireguard I created a PR to fix this via #185 |
@fholzer uh! you got this working with wireguard? I was told wireguard is not supported for manual connections last time I tried. |
Wait, help me out and give me something I can copy/paste, because I used to be using wireguard and the FOSS manual connect scripts with no problem until a month or two ago and now all I get is the "Unauthorized Client" message. Wireguard isn't supported anymore? Or is it? I guess I can go back to OpenVPN but WG is so much prefered. |
@tcurdt and @fholzer Any chance you could share you enhanced scripts that we can use please? I don't quite understand how to match the PF_HOSTNAME and PF_GATEWAY and I tried extracting the server_vip from the response payload in connect_to_wireguard_with_token.sh and passing it to port_forwarding.sh as PF_GATEWAY but I still get an error with the signature. Thanks in advance!! |
@sirskills I am sorry but for me it's back to not working (with OpenVPN). So I don't think I can help.
I am really tired of PIA. Seems like they do not maintain any of this and give a flying f... about this repo. Does anyone have a recommendation for a better VPN? |
@tcurdt if you find one that supports wireguard and port forwarding via script for raspberry pi let me know and I'll do the same. It works fine with openvpn, but they drop that connection on me pretty randomly after a couple of days. |
Somewhere along the lines, the IP had to be changed to VIP to get it to work with latest round of PIA for port forwarding. I'll see if I can find my notes. |
The openvpn connection itself works fine for me. |
The port forwarding for openvpn works for me. I'm using an older version of the script though I believe. |
Did anyone here manage to get this working with WireGuard? I'm attempting to set up port forwarding now and I am getting the |
I'm running the scripts in this order:
get_region.sh
IA_USER=(user removed) PIA_PASS=(password removed) ./get_region.sh
This gives a list of latencies and the following output:
A list of servers and connection details, ordered by latency can be
found in at : /opt/piavpn-manual/latencyList
The lowest latency region is Netherlands.
The script found the best servers from the region you selected.
When connecting to an IP (no matter which protocol), please verify
the SSL/TLS certificate actually contains the hostname so that you
are sure you are connecting to a secure server, validated by the
PIA authority. Please find below the list of best IPs and matching
hostnames for each protocol:
Meta Services 195.78.54.5 - amsterdam429
WireGuard 195.78.54.168 - amsterdam429
OpenVPN TCP 195.78.54.161 - amsterdam429
OpenVPN UDP 195.78.54.209 - amsterdam429
Checking login credentials...OK!
PIA_TOKEN=(token removed)
This token will expire in 24 hours, on Wed Aug 17 01:05:53 2022.
port_forwarding.sh
I then execute port_forwarding.sh using the output from get_region.sh
PF_GATEWAY=195.78.54.209 PF_HOSTNAME=amsterdam429 PIA_TOKEN=(token removed) ./port_forwarding.sh
This gives the output:
Getting new signature... The payload_and_signature variable does not contain an OK status.
If I remove the 'payload_and_signature="$(' and ')"' on line 86 en 90 and change -s to -v on line 86 I get two possible outputs depending on the PF_GATEWAY and PF_HOSTNAME used. Some servers give output 1 and some servers give output 2, a server will always give the same output.
Output 1
< HTTP/2 401
< content-type: text/plain; charset=utf-8
< x-content-type-options: nosniff
< content-length: 64
< date: Mon, 15 Aug 2022 22:34:20 GMT
<
{
"status": "ERROR",
"message": "Unauthorized client"
}
Output 2
curl: (7) Failed to connect to 37.19.197.211 port 19999: Connection refused
The text was updated successfully, but these errors were encountered: