Share via

Networking Issue

Anonymous
2025-03-22T05:20:22.98+00:00

I can access the application from the Domain name "http://domainname.com/" and the VM IP "http://.../," which runs locally in the VM. All these access are only being achieved from the VM Browser, and once I try to access the same application using the IP "http://.../" from the Local Machine Browser I can reach the landing page but when I try to login, I get an error stating http://localhost:5000/api/login/ net::ERR_CONNECTION_REFUSED and using the "http://domainname.com/" it is getting timed out

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Luis Arias 9,536 Reputation points Volunteer Moderator
    2025-03-23T21:03:36.0533333+00:00

    Hi Manoj,

    Welcome to Q&A, I understand that the application works perfectly on the Azure VM, but you're encountering authentication issues when trying to access it from your local network. In that case I would suggest bellow steps for troeubleshoot the root cause issue:

    • Your app might use localhost, which only works inside the VM. Switch it to use the VM’s IP address instead.
    • Ensure port 5000 is open, so your local machine can connect. Verify that the firewall or Network security group is blocking the ports required.
    • Confirm your domain resolves to the VM’s IP (ping domainname.com or nslookup domainname.com) and isn't blocked by DNS issues.
    • Make sure your app isn't limited to localhost, bind it to 0.0.0.0 or the VM IP to allow external connections.
    • Test with the VM IP directly (e.g., http://<VM-IP>

    If the information helped address your question, please Accept the answer.

    Luis

    Was this answer helpful?


Your answer

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