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

    Uploading and running a script?

    Scheduled Pinned Locked Moved General pfSense Questions
    2 Posts 2 Posters 535 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.
    • I
      icglan
      last edited by

      I’ve got pfsense up and running how i need it to for an OpenVPN connection. It’s with PIA and it works fine except for 1 nagging issue.

      Every couple of days PIA change the port forwarding port stopping torrents from working correctly. And so every couple of days i have to go to the command prompt in the webgui and issue the command to get the new port initialized.

      What i would therefore like to know is, is it possible to do this automatically?

      I’ve gone to the PIA site and found some information about how this might be achieved but i can’t figure out how to implementing it within pfsense. Specifically I’m at a lost as to how to upload and automatically run a script.

      I’ve found the upload option in the command prompt section but if i upload a script it puts it in /tmp/ and then i have no idea how i access it let alone make it run automatically.

      Anyone know where I’m going wrong?

      Any help appreciated.

      1 Reply Last reply Reply Quote 0
      • P
        PiBa
        last edited by

        First make sure you enable ssh and can login to pfSense that way with putty or similar.
        This can be used to test the script command.

        Then maybe you can use winscp to upload a file or diagnostics/editfile
        Store it in /root/ or something.. as /tmp/ will be wiped on reboot.
        Likely need to make the script executable: chmod +x
        Then with ssh you can try to run it (or under diagnostics/command and hope it doesnt hang the webgui)

        Then cron package might be able to run it every hour or something..

        There are likely lots of ways.. But maybe above general thoughts help a bit :)

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