service is running on port x in Azure VM.
In order to access service from outside VM inbound rule is requred. However, it opens access to all ip addresses which means that anyone can access the service.
Is it possible to set an allowed IP on port level?
Go to your Azure virtual machine / Networking / Inbound port rules / Add inbound security rule -> Source: IP Addresses
You can add Source IP addresses/CIDR ranges