Hello, @Amal Antony ! I reached out to the virtual machine team. While I can't provide specifics regarding the NSG responses, I can confirm that if rules are in place then traffic will not be allowed (which can be confirmed on the VM).
Why are nmap or other network mapping tools reporting that blocked ports are open on my VM?
There are multiple reports of closed ports being reported as open on VMs by network mapping tools. I can confirm that traffic is not allowed if a properly configured NSG is in place. The tool may be running into an automated response and in the case of nmap, you can confirm this by examining the packet using
--packet-trace to see what is being returned on those ports.
- Stack Exchange: Nmap reporting almost every port as open
- Super User: nmap shows excessive number of open ports
- nmap.org: Port Scanning Basics
- Hackerific: False positive TCP ports!
I hope this has been helpful! Your feedback is important so please take a moment to accept answers.
If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!