I'm trying to create a UDP server on an Azure VM and a UDP client on my personal laptop using python. The server (on the VM) has bound a socket with local IP 127.0.0.1 and port 20001. I only have an NSG and no Vnet. The UDP client on my local laptop tries to send a message to the public IP of the VM on the same port 20001. However, the VM never receives this packet. I suspect it has something to do the networking and NSG settings but I'm a bit clueless as to what IPs and ports need to be whitelisted and where.
I tried :
- Changing the local IP on the server to 0.0.0.0.
- whitelisted my laptop IP and all ports on the NSG.
Is there something specific I need to whitelist on my laptop itself? Anything more to be whitelisted on the NSG?



