Hello Duc Le Trung,
Thanks for your question.
Broadly, It relies on the client’s IP address to determine if the connection originates from within Azure or from an external source. See:
https://www.microsoft.com/en-us/download/details.aspx?id=56519
Regards,
You can mark it 'Accept Answer' if this helped.