Testing VPN service inside azure I finished to setup a connection between my cloud and azure to see azure machines with Site-to-Site connection, but now Im looking how I can config azure VM to use the VPN to send traffic from specific pool Ips.

My schema

  • My internal pool
  • Azure net
  • VPN
  • GatewaySubnet

I know for example using Iptables routing but I don't know inside azure how to add VM to the VPN. All examples I found was to connect to Azure, but not in opposite sense. I need to use UDR?

Other checks were:

-VM can't see VPN gateway using ping.I added route to UDR but not seems to have effect.

-Adding a route using Public IP from gateway not connect

-I don't know If traffic needs to go using GatewaySubnet pool or vpn pool.


  • I have some doubts. 1. Your Gateway subnet( in your Azure VNet( But, if Gateway subnet is inside VNet, you Vnet should be ( If my understanding is right. You could create a VNet( Gateway subnet( and create a VM subnet( 2. My internal pool, do you mean your local subnet? – Shui shengbao Jul 25 '17 at 1:55
  • Based on my knowledge, when you create a Site-to-Site VPN, your local could connect the whole VNet, you could create a new subnet and create VM in the subnet. – Shui shengbao Jul 25 '17 at 5:11
  • Sorry, I confuse vnet with subnet. vnet Azure has and subnet GatewaySubnet has defined and local Gateway is only used to make the tunnel with other side (my internal cloud) with public IP and subnet – deconya Jul 25 '17 at 8:16
  • You had better edit your question about this. – Shui shengbao Jul 25 '17 at 8:18
  • According to your description, your local subnet is If this is right. You Azure VNet could not select Local subnet and Azure Vnet subnet could not polymerization. – Shui shengbao Jul 25 '17 at 8:22

When you setup your VPN Gateway, you should have had to configure a "local gateway" If you correctly configured your internal pool in that construct, routing will just work.

  • yes, but guide not use local network gateway how something for your azure network. guide – deconya Jul 25 '17 at 8:19
  • Step 5 is the local gateway step – CtrlDot Jul 25 '17 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.