Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article describes how to create a connection between two virtual networks in the same environment. When you set up the connections, you learn how VPN gateways in Azure Stack Hub work. Connect two VNETs within the same Azure Stack Hub environment using Fortinet FortiGate. This procedure deploys two VNETs with a FortiGate NVA, a network virtual appliance, in each VNET each within a separate resource group. It also details the changes required to set up an IPSec VPN between the two VNETs. Repeat the steps in this article for each VNET deployment.
Prerequisites
Access to a system with available capacity to deploy the required compute, network, and resource requirements needed for this solution.
A network virtual appliance (NVA) solution downloaded and published to the Azure Stack Hub Marketplace. An NVA controls the flow of network traffic from a perimeter network to other networks or subnets. This procedure uses the Fortinet FortiGate Next-Generation Firewall Single VM Solution.
At least two available FortiGate license files to activate the FortiGate NVA. Information on how to get these licenses, see the Fortinet Document Library article Registering and downloading your license.
This procedure uses the Single FortiGate-VM deployment. You can find steps on how to connect the FortiGate NVA to the Azure Stack Hub VNET to in your on-premises network.
For more information on how to deploy the FortiGate solution in an active-passive (HA) set up, see the details in the Fortinet Document Library article HA for FortiGate-VM on Azure.
Deployment parameters
The following table summarizes the parameters that are used in these deployments for reference:
Deployment one: Forti1
| FortiGate Instance Name | Forti1 |
|---|---|
| BYOL License/Version | 6.0.3 |
| FortiGate administrative username | fortiadmin |
| Resource Group name | forti1-rg1 |
| Virtual network name | forti1vnet1 |
| VNET Address Space | 172.16.0.0/16* |
| Public VNET subnet name | forti1-PublicFacingSubnet |
| Public VNET address prefix | 172.16.0.0/24* |
| Inside VNET subnet name | forti1-InsideSubnet |
| Inside VNET subnet prefix | 172.16.1.0/24* |
| VM Size of FortiGate NVA | Standard F2s_v2 |
| Public IP address name | forti1-publicip1 |
| Public IP address type | Static |
Deployment two: Forti2
| FortiGate Instance Name | Forti2 |
|---|---|
| BYOL License/Version | 6.0.3 |
| FortiGate administrative username | fortiadmin |
| Resource Group name | forti2-rg1 |
| Virtual network name | forti2vnet1 |
| VNET Address Space | 172.17.0.0/16* |
| Public VNET subnet name | forti2-PublicFacingSubnet |
| Public VNET address prefix | 172.17.0.0/24* |
| Inside VNET subnet name | Forti2-InsideSubnet |
| Inside VNET subnet prefix | 172.17.1.0/24* |
| VM Size of FortiGate NVA | Standard F2s_v2 |
| Public IP address name | Forti2-publicip1 |
| Public IP address type | Static |
Note
* Choose a different set of address spaces and subnet prefixes if the preceding values overlap in any way with the on-premises network environment, including the VIP Pool of either Azure Stack Hub. Also ensure that the address ranges don't overlap with one another.
Deploy the FortiGate NGFW
Open the Azure Stack Hub user portal.
Select Create a resource and search for
FortiGate.
Select the FortiGate NGFW and select Create.
Complete the Basics using the parameters from the Deployment parameters table.
Select OK.
Provide the virtual network, subnets, and VM size details using the Deployment parameters table.
Warning
If the on-premises network overlaps with the IP range
172.16.0.0/16, you must select and set up a different network range and subnets. To use different names and ranges than the ones in the Deployment parameters table, use parameters that don't conflict with the on-premises network. Take care when setting the VNET IP range and subnet ranges within the VNET. You don't want the range to overlap with the IP ranges that exist in your on-premises network.Select OK.
Configure the public IP for the FortiGate NVA:
Select OK. Then select OK.
Select Create.
The deployment takes about 10 minutes.
Configure routes (UDRs) for each VNET
Perform these steps for both deployments, forti1-rg1 and forti2-rg1.
Open the Azure Stack Hub user portal.
Select Resource groups. Type
forti1-rg1in the filter and double-click the forti1-rg1 resource group.
Select the forti1-forti1-InsideSubnet-routes-xxxx resource.
Select Routes under Settings.
Delete the to-Internet route.
Select Yes.
Select Add to add a new route.
Name the route
to-onprem.Enter the IP network range that defines the network range of the on-premises network to which the VPN connects.
Select Virtual appliance for Next hop type and
172.16.1.4. Use your IP range if you're using a different IP range.
Select Save.
You need a valid license file from Fortinet to activate each FortiGate NVA. The NVAs don't function until you activate each NVA. For more information about how to get a license file and steps to activate the NVA, see the Fortinet Document Library article Registering and downloading your license.
You need to acquire two license files - one for each NVA.
Create an IPSec VPN between the two NVAs
After activating the NVAs, create an IPSec VPN between the two NVAs.
Follow these steps for both the forti1 NVA and forti2 NVA:
Go to the fortiX VM overview page to get the assigned public IP address:
Copy the assigned IP address, open a browser, and paste the address into the address bar. Your browser might warn you that the security certificate isn't trusted. Continue anyway.
Enter the FortiGate administrative user name and password you provided during the deployment.
Select System > Firmware.
Select the box showing the latest firmware, such as
FortiOS v6.2.0 build0866.
Select Backup config and upgrade > Continue.
The NVA updates its firmware to the latest build and reboots. The process takes about five minutes. Sign in again to the FortiGate web console.
Select VPN > IPSec Wizard.
Enter a name for the VPN, such as
conn1in the VPN Creation Wizard.Select This site is behind NAT.
Select Next.
Enter the remote IP address of the on-premises VPN device to which you're going to connect.
Select port1 as the Outgoing Interface.
Select Pre-shared Key and enter (and record) a pre-shared key.
Note
You need this key to set up the connection on the on-premises VPN device. The keys must match exactly.
Select Next.
Select port2 for the Local Interface.
Enter the local subnet range:
- forti1: 172.16.0.0/16
- forti2: 172.17.0.0/16
Use your IP range if you're using a different IP range.
Enter the appropriate remote subnets that represent the on-premises network, which you connect to through the on-premises VPN device.
- forti1: 172.16.0.0/16
- forti2: 172.17.0.0/16
Use your IP range if you're using a different IP range.
Select Create
Select Network > Interfaces.
Double-click port2.
Choose LAN in the Role list and DHCP for the Addressing mode.
Select OK.
Repeat the steps for the other NVA.
Bring up all phase 2 selectors
After you complete the preceding steps for both NVAs:
On the forti2 FortiGate web console, select Monitor > IPsec Monitor.
Highlight
conn1and select Bring Up > All Phase 2 Selectors.
Test and validate connectivity
You can now route between each VNET through the FortiGate NVAs. To validate the connection, create an Azure Stack Hub VM in each VNET's InsideSubnet. You can create an Azure Stack Hub VM by using the portal, Azure CLI, or PowerShell. When creating the VMs:
Place the Azure Stack Hub VMs on the InsideSubnet of each VNET.
Don't apply any NSGs to the VM upon creation. Remove the NSG that gets added by default if you create the VM from the portal.
Ensure that the VMs firewall rules allow the communication you need to test connectivity. For testing purposes, it's recommended to disable the firewall completely within the OS if possible.
Next steps
Differences and considerations for Azure Stack Hub networking
Offer a network solution in Azure Stack Hub with Fortinet FortiGate