Unable to connect to VM via 2nd NIC

vinixwu 21 Reputation points

Some time ago I migrated the network interface(NIC2 for short) from a old Windows Server 2012 R2 VM(VM1) to a Windows Server 2019 VM(VM2).

I migrated the public IP from another VM(VM3) to NIC2 recently, but I can not connect to VM2 via this public IP. I can connect to VM2 using public IP of 1st NIC without problem.

Network Security Group associated with NIC2 and Windows Firewall on VM2 has been configured to open needed ports.

I noticed that NIC2 has no internet access in Control Panel\Network and Internet\Network Connections on VM2.

How do I connect to VM via NIC2?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
5,265 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. JimmySalian-2011 31,901 Reputation points


    As you have already checked Windows FW and ports, I will suggest you to check the IP flow verify by using Azure Network Watcher and follow the troubleshooting steps that might help. If all the steps are exhuasted I will suggest you to raise a support case from the Portal.


    Hope this helps.

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

    0 comments No comments

  2. vinixwu 21 Reputation points


    Thanks for reply.

    I verified that the my public IP passed IP flow verify and NSG diagnostics in Network Watcher:


    I also verified the firewall on my side:

    And Windows Firewall settings on VM:

    It seems all OK. Any suggestion?

    0 comments No comments

  3. vinixwu 21 Reputation points

    I found the solution. According to this forum post, there is no default gateway on 2nd NIC by default.
    So I setup IPv4 in properties of 2nd NIC in VM manually and input the same gateway and DNS Server of another NIC.

    Now I can connect to VM via 2nd NIC. :D

    0 comments No comments