Automate IPSec Setup via PHP

Job ID: 39883146

Budget: $30 – $250 USD

I have already built the IPSec side on a MikroTik router; the tunnel is waiting for a matching peer. What I need now is a fully automated way to bring the server side up (and tear it down) without ever typing a single shell command.

When I type
php /path-to/clean_setup.php
every existing IPSec policy, peer, secret, package or rule on the server must be wiped so the machine is pristine without touching other non related things like Apache and MySQL.

When I type
php setup_ipsec.php
the script should install or update the required IPSec stack (strongSwan), write the correct /etc/ipsec.conf and /etc/ipsec.secrets using the exact parameters currently defined on the MikroTik, adjust firewall and forwarding settings, restart the service and confirm that the tunnel establishes etc

Deliverables
• clean_setup.php – removes every IPSec trace and related firewall changes
• setup_ipsec.php – performs a complete, non-interactive rebuild of the tunnel and verifies connectivity (simple ping/STATUS output is fine)
• Short read-me

I will give you SSH access, as well as access to the MikroTik so you can double-check proposals, PSK, selectors, etc. Once the scripts are in place we will run a final test together to confirm that the tunnel comes up instantly after executing clean_setup.php and setup_ipsec.php.

This is a compact, well-defined task for someone fluent in MikroTik RouterOS, Linux IPSec and PHP CLI scripting. If that describes you, it should be a quick win.

MAX BID $55