Scripting openvpn client changes
-
Please forgive the seemingly noob question....
Running pfSense CE 2.7.2
I have 10 openvpn clients configured. I would like to automate rotating through those 10 clients through a cron job.
As it stands right now, I have to perform the following manually.
- Navigate to interfaces -- interface assignments -- use the network port drop down for my OPT1 interface to change to the desired openvpn client
- Navigate to VPN -- openvpn -- clients -- edit the currently active client and check the disabled (disable this client) checkbox -- save
- From VPN -- openvpn -- clients -- edit the desired client and UNcheck the disabled (disable this client) checkbox -- save
As expected the VPN egress changes to the location defined in the newly enabled openvpn client. This process works fine but is manual. I looed at the documentation (no help at all), found some github sites that came sorta close, and played around with the shell and PHP shell options but with no euccess
I welcome any thoughts or ideas.
Many thanks.
SchuFire
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.