Automated scripts for Private Internet Access port forwarding
-
@Soloam Hi! Could you please share your updated version of the script? Thank you in advance !
-
Hi! Thanks for this very useful script. I'm having a problem where the config automatically reverts after a minute or so:
Using version 1.06 on 2.4.4-RELEASE-p3 and the devd script. Everything works fine, the port change is pulled from PIA, applied to the config, and placed in pia_port.txt. However, after a minute the config reverts to what is was prior to the script running. If I watch the webGUI Firewall/Aliases/Ports after restarting the openvpn instance, I can see the alias for my port is successfully changed to the new value, but after about a minute it goes back to what it was before running the script. Therefore, only the pia_port.txt has the new value for the port, and the config.xml still has the old one. Is this due to some config file lock or something that prevents scripts from replacing config.xml? I can't find a way around it. No matter what changes this script makes to the config, after running cp /tmp/config.pia $CONFFILE and then rm /tmp/config.cache, the changes only persist for the next 1 minute. Any ideas?
-
@Soloam do you mind sharing your script please?
-
@fm808 Hey, check the thread bellow. It is a re-written and updated one. Be sure you read the first three port replies as there is a missing piece in the OP.
https://forum.netgate.com/topic/150156/pia-automatic-port-forward-update-for-transmission-daemon
-
@HolyK it didnt work following that guide, i keep getting
[PIA] Port forwarding is already activated on this connection, has expired, or you are not connected to a PIA region that supports port forwarding.
-
@fm808 Are you on most-recent version of pfSense ? (currently 2.4.5-RELEASE-p1). I had similar issue on 2.4.4 last month but after update to 2.4.5 issues disappeared. Check the version, update if possible and post in the other thread (as here it is a quite obsolete).
-
@HolyK i am on latest version
-
@fm808 I'll post back when I'm back home
-
@HolyK i got it to work, just used a different server and made some modification to the script to suit my use case, had to change the ssh user, i am not using 'transmission' but something else (that was part 1 of the issue) then i just had to find a current gen server that worked with the API...DE Frankfurt is what worked for me, tried Switzerland and other locations but it didn't work.
-
@fm808 Cool ! Glad you figured it out :]