I created two virtual machines in Azure. One of them is in Australia South and the other is in Central India. I ran client program in one machine and server program in other machine. There are not able to connect to each other. After a little google search, I created Network Security Group in both VMs and added the following inbound and outbound rule.
Source - Any
Destination - Any
Service - Custom (Any/32000-32200)
Action - Allow
I am connecting to ports in between 32000-32200 in my program, but still the machines are not connecting to each other. I am using Ubuntu Server 16.04 and classic deployment model. I kindly request you to help me out.. I am attaching screenshots of my network security group and output of netstat command.