Forum Discussion
Connecting 2 VMs within the same VNET
Hi everybody,
I have trouble connecting 2 VMs within the same VNET. On one VM I have installed an ApplicationServer, which is listening on the port 8199. Unfortunately, I cannot reach this Application Server from a different VM within the same VNET.
When using psping on 10.0.0.4:8199 I get the following error message:
This operation returned because the timeout period expired.
When using psping on 10..0.0.4:3389 the ping is successful.
Netstat on the VM with the Application Server has the following entry:
Proto Local Address Foreign Address State
TCP 10.0.0.4:8199 MB:0 LISTENING
From my current unterstanding, it should be posssible to connect the VMs without any problems. Any other posts I found have not been helpful.
Does anybody have an idea how to connect these? Thank you very much in advance!
Best regards,
Alex
pepper445 If you have both VM's in the same VNET then yes they should be able to connect to each other. I would start by checking the following.
- NSG on the subnet blocking IP to IP connections
- NSG on the VM NIC
- Windows/Linux local Firewall inside the VM
All 3 will need to be open for a connection.
- CraigWilson_Brass Contributor
pepper445 If you have both VM's in the same VNET then yes they should be able to connect to each other. I would start by checking the following.
- NSG on the subnet blocking IP to IP connections
- NSG on the VM NIC
- Windows/Linux local Firewall inside the VM
All 3 will need to be open for a connection.
- Bryan HaslipIron Contributor
+1 to the Local Windows/Linux firewall. That is usually the issue I run into with connectivity within the same VNET. By default in Azure the traffic on the same VNET is allowed unless you specifically put rules to prevent that. Like Craig stated this can be at the subnet level NSG or NIC NSG.