大网数据广告活动
服务器运维问答

How to connect 2 Virtual Network with on-premises without another VPN?

· 52CE 我爱测

I'm totally new to Azure (and new to any public cloud, never did anything there). There is one productive virtual network with VPN connection to on-premises resources. Goal is to create new resource group with new virtual network…

问题原文

原帖链接 · vanko · CC BY-SA 4.0

I'm totally new to Azure (and new to any public cloud, never did anything there).

There is one productive virtual network with VPN connection to on-premises resources.
Goal is to create new resource group with new virtual network and connect it with productive virtual network and on-premises resources. But how to achieve this? I've connected two VNets with network peering and it works but I still don't have access to on-premises things.

Do I have to create another VPN connection? I've read something about routing (here: https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-udr-overview) but it looks to complex to me.

Also I tried this: https://docs.microsoft.com/en-us/azure/virtual-network/tutorial-create-route-table-portal but I was stuck in the middle not knowing what to do (and trying not to break production VNet as well).

已采纳解答

原帖链接 · Taguada · CC BY-SA 4.0

In this case, when you have two VNETs and your VNG (VPN connection) is only in one VNET, you should create the second VNET to use a remote gateway and your current VNET must accepts a transit gateway. Basically your connection from VNET (without VPN and VNG) will use remote gateway in VNET where you have VNG and your VPN to on-primeses. To make it easier to understand, please have a look at this documentation https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-peering-gateway-transit.

It looks like this topology, site S2S VPN (site to site VPN) is connect to HUB (your VNET with VPN / VNG) and site Spoke-RM would be your second VNET (new one).

Basically you should have this configuration in your VNET where you have VPN, VNG (Virtual Network Gateway), LNG (Local Network Gateway) and GatewaySubnet.

In this VNET where you have VNG and VPN, go to Peering configuration, this option must be selected. From the blade Peering in this VNET, you must enable Allow gateway transit option. It allows traffic from the other VNET to connect to this GatewaySubnet.

From the other VNET in Peering configuration where you don't have VNG / VPN, you must select this option Use remote gateways. It allows this VNET to use remote gateway GatewaySubnet in the VNET with VNG / VPN.

Here it is my test. Below you see route table of my VM in VNET2.

From my VPN device on local network (on-premises), you must have route to both address space of your VNETs as I mentioned in the comments. I'm using Windows Server like a VPN site to site, but you should have a firewall where you configured your VPN site to site.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-06-25)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。