Hi Team,
I have created a VM, then installed Java / Tomcat Server inside the VM. After installed the Tomcat server, I could access the Tomcat server's home page using http://localhost:8080/ inside VM.
I have assigned the DNS name for the VM as well. I could not access the same Tomcat server home page using the DNS assigned to the VM, inside the VM itself.
I have setup the InboundRule for port 80 and 443 to the NSG tied to the VM. (The NSG is tied to the subnet anyway).
I have setup the Windows defender firewall Rule as well with port 80 to be allowed. Still, I could not access the tomcat server's home page with DNS name configured (in other words, with public ip configured) inside the VM and outside the VM.