A TFS server setup in a Azure VM, in a virtual network and a domain, can be exposed to public access by following below steps.
The TFS server should be up and running and it should be accessible other virtual machines in the domain. DNS in setup in domain controller to resolve the TFS server internal static IP.
It is required to identify the public IP of the TFS server. Public IP can be found by clicking on Azure VM and then going to dashboard of the VM.
In a local machine which have internet access, this public IP can be added to the host file to allow to resolve name.
When try to access TFS server in azure VM in local machine it fails.
Attempt with IP address does not work.
This is due to TFS port 8080 in Azure VM is not accessible publicly (form local machine).
Fist allow 8080 port for public access in TFS Server.
To enable access add an endpoint allowing 8080 publicly as shown below for the TFS VM.
Specify TCP port 8080 for Public and Private ports.
Once end point is successfully configured TFS hosted in cloud can be accessed with local machine.