Uploading and running a script?
-
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.
-
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 :)