SOLVED
Home

Connecting 2 VMs within the same VNET

%3CLINGO-SUB%20id%3D%22lingo-sub-927434%22%20slang%3D%22en-US%22%3EConnecting%202%20VMs%20within%20the%20same%20VNET%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-927434%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20everybody%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20trouble%20connecting%202%20VMs%20within%20the%20same%20VNET.%20On%20one%20VM%20I%20have%20installed%20an%20ApplicationServer%2C%20which%20is%20listening%20on%20the%20port%208199.%20Unfortunately%2C%20I%20cannot%20reach%20this%20Application%20Server%20from%20a%20different%20VM%20within%20the%20same%20VNET.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20using%20psping%20on%2010.0.0.4%3A8199%20I%20get%20the%20following%20error%20message%3A%3C%2FP%3E%3CP%3EThis%20operation%20returned%20because%20the%20timeout%20period%20expired.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20using%20psping%20on%2010..0.0.4%3A3389%20the%20ping%20is%20successful.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENetstat%20on%20the%20VM%20with%20the%20Application%20Server%20has%20the%20following%20entry%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EProto%26nbsp%3B%20Local%20Address%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Foreign%20Address%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20State%3C%2FP%3E%3CP%3ETCP%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2010.0.0.4%3A8199%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20MB%3A0%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20LISTENING%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFrom%20my%20current%20unterstanding%2C%20it%20should%20be%20posssible%20to%20connect%20the%20VMs%20without%20any%20problems.%20Any%20other%20posts%20I%20found%20have%20not%20been%20helpful.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20anybody%20have%20an%20idea%20how%20to%20connect%20these%3F%20Thank%20you%20very%20much%20in%20advance!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20regards%2C%3C%2FP%3E%3CP%3EAlex%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-927434%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-931008%22%20slang%3D%22en-US%22%3ERe%3A%20Connecting%202%20VMs%20within%20the%20same%20VNET%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-931008%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F430984%22%20target%3D%22_blank%22%3E%40pepper445%3C%2FA%3E%26nbsp%3BIf%20you%20have%20both%20VM's%20in%20the%20same%20VNET%20then%20yes%20they%20should%20be%20able%20to%20connect%20to%20each%20other.%20I%20would%20start%20by%20checking%20the%20following.%3C%2FP%3E%3CUL%3E%3CLI%3ENSG%20on%20the%20subnet%20blocking%20IP%20to%20IP%20connections%3C%2FLI%3E%3CLI%3ENSG%20on%20the%20VM%20NIC%3C%2FLI%3E%3CLI%3EWindows%2FLinux%20local%20Firewall%20inside%20the%20VM%3C%2FLI%3E%3C%2FUL%3E%3CP%3EAll%203%20will%20need%20to%20be%20open%20for%20a%20connection.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-934950%22%20slang%3D%22en-US%22%3ERe%3A%20Connecting%202%20VMs%20within%20the%20same%20VNET%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-934950%22%20slang%3D%22en-US%22%3E%3CP%3E%2B1%20to%20the%20Local%20Windows%2FLinux%20firewall.%20That%20is%20usually%20the%20issue%20I%20run%20into%20with%20connectivity%20within%20the%20same%20VNET.%20By%20default%20in%20Azure%20the%20traffic%20on%20the%20same%20VNET%20is%20allowed%20unless%20you%20specifically%20put%20rules%20to%20prevent%20that.%20Like%20Craig%20stated%20this%20can%20be%20at%20the%20subnet%20level%20NSG%20or%20NIC%20NSG.%26nbsp%3B%20%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
pepper445
Occasional Visitor

 

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

2 Replies
Solution

@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.

+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.   

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
30 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies