How can I route Azure VM going through Vnet Gateway <-> Local Gateway to use on-prem internet?

Alp Ertek 0 Reputation points
2023-10-16T15:49:56.34+00:00

We currently have a Virtual Network that runs in an internal environment and connects down to our firewall and from there to the rest of the network. I wanted to see if there was a possibility from there to get outbound connectivity for the VMs utilizing our on-prem public IP Address instead. I understand it's not the best way to do things but for budgetary reasons I'm trying to see if I can avoid paying expensive virtual firewall costs on the cloud.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,585 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,311 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ChaitanyaNaykodi-MSFT 24,666 Reputation points Microsoft Employee
    2023-10-16T21:08:03.4733333+00:00

    @Alp Ertek

    Thank you for reaching out

    If I understand correctly, you want to direct all internet bound traffic in your Azure Virtual Network to your on-prem network and then to the internet.

    This is possible using forced tunneling in Azure VPN Gateway. Forced tunneling lets you redirect or "force" all Internet-bound traffic back to your on-premises location via S2S VPN tunnel for inspection and auditing.

    User's image

    You can follow this tutorial to configure forced tunneling using Default Site for site-to-site connections.

    Hope this helps! Please let me know if you have any additional questions. Thank you!


    ​​Please "Accept the answer" if the information helped you. This will help us and others in the community as well.