Configuring a route table
Route tables are commonly used with Azure Firewall when there is cross-connectivity. Cross-connectivity can either be with other Azure virtual networks or with on-premises networks. In such cases, Azure Firewall uses route tables to forward traffic based on the rules specified in the route tables.
Getting ready
Open the PowerShell console and make sure you are connected to your Azure subscription.
How to do it...
In order to create a new route table in Azure Firewall, execute the following command:
$RG="Packt-Networking-Script" $Location="West Europe" $Azfw = Get-AzFirewall -ResourceGroupName $RG $config = $Azfw.IpConfigurations[0].PrivateIPAddress $Route = New-AzRouteConfig -Name 'Route1' -AddressPrefix 0.0.0.0/0 -NextHopType VirtualAppliance -NextHopIpAddress $config $RouteTable = New-AzRouteTable -Name 'RouteTable1' -ResourceGroupName $RG -location $Location -Route $Route
How it works...
Using...