Unable to open nodejs web app running on azure vm(ubuntu 18.04) in Browser with http://server-public-ip:port-number

Kingsley M 21 Reputation points
2022-12-20T19:32:20.337+00:00

I have deployed my nodejs app and it is running well in the vm.
I have set inbound rules for all necessary ports needed to run application but when I try to open the app in the browser with http://server-public-ip:port-number it throws errors "refused to connect". I also set up DNS name for server and it is still not working.
I have deployed the same application on AWS ec2 and it works with no issues and I can also access it from the browser with no issues.
What could be the issue here? thanks

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

Accepted answer
  1. Takahito Iwasa 4,851 Reputation points MVP Volunteer Moderator
    2022-12-21T00:35:05.327+00:00

    Hi, @Kingsley M .
    First, I think that you are talking abount Azure Virtual Machine.
    so I removed "azure-webapps" tag.

    It shoud work.

    You said, "I have set inbound rules for all necessary ports needed to run application".
    Can you share detail settings abount rule ?
    Did you configure Network Security Group ?


1 additional answer

Sort by: Most helpful
  1. Lex Li (Microsoft) 6,037 Reputation points Microsoft Employee
    2022-12-21T08:55:30.903+00:00

    There are two layers of firewall,

    Which one did you miss?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.