Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Automated scripts for Private Internet Access port forwarding

    Scheduled Pinned Locked Moved NAT
    69 Posts 37 Posters 270.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • SoloamS
      Soloam
      last edited by

      @Bagpuss thank you, problem is solved! It was a typo error. Sorry

      Thank You
      Best Regards

      H F 2 Replies Last reply Reply Quote 0
      • H
        HolyK @Soloam
        last edited by

        @Soloam Hi! Could you please share your updated version of the script? Thank you in advance !

        1 Reply Last reply Reply Quote 0
        • D
          dnarzi
          last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • F
            fm808 @Soloam
            last edited by

            @Soloam do you mind sharing your script please?

            H SoloamS 2 Replies Last reply Reply Quote 0
            • H
              HolyK @fm808
              last edited by

              @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

              F 1 Reply Last reply Reply Quote 0
              • F
                fm808 @HolyK
                last edited by

                @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.

                H 1 Reply Last reply Reply Quote 0
                • H
                  HolyK @fm808
                  last edited by

                  @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).

                  F 1 Reply Last reply Reply Quote 0
                  • F
                    fm808 @HolyK
                    last edited by

                    @HolyK i am on latest version

                    1 Reply Last reply Reply Quote 0
                    • SoloamS
                      Soloam @fm808
                      last edited by

                      @fm808 I'll post back when I'm back home

                      1 Reply Last reply Reply Quote 0
                      • F
                        fm808
                        last edited by

                        @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.

                        H 1 Reply Last reply Reply Quote 0
                        • H
                          HolyK @fm808
                          last edited by

                          @fm808 Cool ! Glad you figured it out :]

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.