DEV Community

Hyacienth Ugochukwu
Hyacienth Ugochukwu

Posted on

How To Route Traffic To The Firewall

Now that a firewall is in place with policies that enforce your organization's security requirements, you need to route your network traffic to the firewall subnet so it can filter and inspect the traffic. Route tables provide control over the routing of network traffic to and from the web application. Network Traffic is subject to the firewall rules when you route your network traffic to the firewall as the subnet default gateway. Routing traffic to a firewall is the process of directing network traffic to a firewall subnet so that it can be inspected and filtered.

We create a route table first

  1. Record the private and public IP address of app-vnet-firewall. a. In the search box at the portal's top, enter Firewall. Select Firewall in the search results. b. Select app-vnet-firewall. c. Select Overview. i. Record the Private IP address. d. In the Overview pane select fwpip e. Record the Public IP address.
  2. In the search box, enter Route tables. When the Route table appears in the search results, select it.
  3. In the Route table page, select + Create.
  4. On the Basics tab of Create Route table, enter the information as listed below:

Property Value
Subscription Select your subscription
Resource group YOUR RESOURCE GROUP
Region East US
Name app-vnet-firewall-rt
Select Review + Create and then select Create.

We then associate the route table to the subnets

  1. In the search box, enter Route tables. and select Route Tables from the search results.
  2. Select app-vnet-firewall-rt.
  3. Select Subnets.
  4. Select + Associate.
  5. On the Associate subnet page, enter the information listed below:

Property Value
Virtual network app-vnet (YOUR RESOURCE GROUP)
Subnet frontend

  1. Select OK.
  2. Repeat the steps above to associate the app-vnet-firewall-rt route table to the backend subnet in app-vnet.

Lastly, we will create a route in the route table

  1. In the search box, enter Route tables. and select Route Tables from the search results.
  2. Select app-vnet-firewall-rt.
  3. Select Routes.
  4. Select + Add.
  5. On the Add route page, enter the information listed below:

Property Value
Route name outbound-firewall
Destination type IP addresses
Destination IP addresses/CIDR range 0.0.0.0/0
Next hop type Virtual appliance
Next hop address private IP address of the firewall recorded earlier

  1. Select Add.

Now the outbound traffic from the front end and backend subnet will route to the firewall.

Top comments (0)