Scripts for hub FortiGates in Azure vWAN
Following is an overview of how to create and install scripts to Hub1 and Hub2 FortiGates in Azure vWAN:
- Create a script for Hub1 FortiGate in Azure vWAN. See Creating a script for Hub1.
- Create a script for Hub2 FortiGate in Azure vWAN. See Creating a script for Hub2.
- Install the scripts to Hub1 and Hub2 FortiGates in Azure vWAN. See Installing scripts to hub FortiGates .
Creating a script for Hub1
To create a script for Hub1 FortiGate:
-
In FortiManager, go to Device Manager > Scripts.
-
Click Create New > Script to create a new script for Hub1 FortiGate.
-
Set Script Name box to Hub1.
-
In the Script details box, paste the following script. Be sure to set the correct
remote-ip
for the VXLAN tunnel:config system vxlan edit "VXLAN-to-Hub2" set interface "port1" set vni 1500 set remote-ip "<port1 IP of Hub2>" next end config system interface edit "VXLAN-to-Hub2" set vdom "root" set ip 169.254.40.1/30 set allowaccess ping set type vxlan set interface "port1" next end config router static edit 0 set gateway 169.254.40.2 set distance 5 set priority 60000 set device "VXLAN-to-Hub2" set comment "Default summary for RPF via VXLAN" next end
-
Expand Advanced Device Filters, and select Hub1 from the dropdown.
The name of Hub1 FortiGate should end in 0.
-
Click OK to save the script.
Creating a script for Hub2
To create a script for Hub2:
-
Click Create New > Script to create a script for Hub2 FortiGate.
-
Set Script Name box to Hub2.
-
In the Script details box, paste the following script. Be sure to set the correct
remote-ip
for the VXLAN tunnel:config system vxlan edit "VXLAN-to-Hub1" set interface "port1" set vni 1500 set remote-ip "<port1 IP of Hub1>" next end config system interface edit "VXLAN-to-Hub1" set vdom "root" set ip 169.254.40.2/30 set allowaccess ping set type vxlan set interface "port1" next end config router static edit 0 set gateway 169.254.40.1 set distance 5 set priority 60000 set device "VXLAN-to-Hub1" set comment "Default summary for RPF via VXLAN" next end
-
Expand Advanced Device Filters, and select Hub2 from the dropdown.
The name of Hub2 FortiGate should end in 1.
-
Click OK to save the script.
Installing scripts to hub FortiGates
To install scripts to hubs 1 and 2:
- In Device Manager > Devices & Groups, select your hub group.
- Right click on Hub1 FortiGate, and select Run Script. The Run Script on Device window is displayed.
The name of Hub1 FortiGate should end in 0.
- Select your script named Hub1, and click Run Now.
- When finished, right click your Hub2 FortiGate, and select Run Script. The Run Script on Device window is displayed.
The name of the Hub2 FortiGate should end in 1.
- Select your script named Hub2, and click Run Now.