Question around port forwarding setup
jgilfoil opened this issue · 2 comments
jgilfoil commented
So i'm trying to figure out the purpose of the below code. I'm gonna state a couple of assumptions, and hopefully you can point out anything I get wrong.
- you've already setup your port forwarding through PIA's interface somewhere on their site.
- This code is just a clever way to dynamically pull the current forwarded ports so that you can pass that along to other containers via the var/run/pia/pia_port file.
Did I get that correct?
client_id=$(head -n 100 /dev/urandom | sha256sum | tr -d " -")
json=$(curl "http://209.222.18.222:2000/?client_id=$client_id" 2>/dev/null)
Thanks!
P.S. Really like your setup here, and i'm entirely jealous. I may attempt a similar strategy soon.
firecat53 commented
Information about PIA's port forwarding setup is here. It's only accessible via certain servers. So the answer to 1. is technically no...port forwarding is accessed through their API. There's no setup needed. The answer to 2. is yes.
Thanks for the kind words!
jgilfoil commented
Ahh ok, that link fills in the gap there, thanks!