Monday, August 2, 2021

AdminToolbox.Fortiwizard Automate FortiGate VPN Tunnels

I've recently built a PowerShell module that serves the purpose of generating configuration scripts for FortiGate Firewalls. While not limited to, the primary role being to generate VPN configuration scripts for different IPSec tunnel scenarios.

I am responsible for building Many VPN tunnels and I got tired of the repetitive task of copying and pasting parameters into configuration scripts. I also am not a fan of the FortiGate VPN wizard so this module just made sense.

As I continued to develop the function, I decided the ultimate goal would be to run a single PowerShell function and have that generate a VPN config from a VPN form. A VPN form can be sent to a 3rd party, and when returned with the required tunnel parameters such as Peer Address and remote hosts, you can immediately generate a tunnel. To take it a step further I generated Examples that use Posh-SSH to invoke the generated configuration script directly to the firewall without ever leaving PowerShell.

The amount of time this will save me is huge. Fork it, change it, contribute, critique it, or ignore it. I am pretty happy with this one, and hopefully it can be useful for some of you.

Here are some related links.

AdminToolbox.FortiWizard Github

Code Examples

Sample VPN Form

Demo Video



No comments:

Post a Comment