how to connect to VM(VPN) using cdn?

Mahan Mohammadian nasab 0 Reputation points
2024-01-03T21:48:42.4133333+00:00

hello

i need help , i just deployed a VM in azure and lunched Openvpn on it, how can i use Azure CDN to connect to VM for Fastest VPN Service?

Azure Content Delivery Network
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Konstantinos Passadis 17,286 Reputation points
    2024-01-04T04:44:03.11+00:00

    Hello #Mahan Mohammadian nasab !

    Welcome to Microsoft QnA!

    A content delivery network (CDN) is a distributed network of servers that can efficiently deliver web content to users. A CDN store cached content on edge servers in point-of-presence (POP) locations that are close to end users, to minimize latency.

    Azure CDN offers developers a global solution for rapidly delivering high-bandwidth content to users by caching their content at strategically placed physical nodes across the world. Azure CDN can also accelerate dynamic content, which can't get cached, by using various network optimizations using CDN POPs. For example, route optimization to bypass Border Gateway Protocol (BGP).

    The benefits of using Azure CDN to deliver web site assets include:

    • Better performance and improved user experience for end users, especially when using applications where multiple round-trips requests required by end users to load contents.
    • Large scaling to better handle instantaneous high loads, such as the start of a product launch event.
    • Distribution of user requests and serving of content directly from edge servers so that less traffic gets sent to the origin server.

    In this case it is not something you can do , with Azure VPN and CDN

    Unless you have some Content to pubish there is n correlation with OpenVPN

    https://learn.microsoft.com/en-us/azure/cdn/cdn-overview


    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!

    Regards


  2. GitaraniSharma-MSFT 47,421 Reputation points Microsoft Employee
    2024-01-05T13:42:38.8533333+00:00

    Hello @Mahan Mohammadian nasab ,

    I understand that you would like to know how to connect to a VM with X-ui installed on it, using Azure CDN.

    I researched about X-ui and the only document I could find was the below:

    https://seakfind.github.io/2021/10/10/X-UI/

    It lists the below steps:

    1. Get a virtual private server or VPS from any cloud provider. The X-UI install script supports Ubuntu 16+, Debian 8+, or CentOS 7+. You need to have ports 80 and 443 on your VPS open for TCP input. Also, open port 54321 for TCP input.
    2. Get a domain name from a DNS registrar.
    3. Create a DNS A record pointing from your host name to your VPS.
    4. Optionally, add your domain to Cloudflare. This will allow you to insert a content distribution network or CDN in between you and your server. However, if you are going to add a CDN, do not turn on proxying in Cloudflare until the end. For now, just use the DNS features of Cloudflare. Adding your domain to Cloudflare is optional, and you can continue to use your domain name registrar’s nameservers if you prefer.

    Is this what you are doing?

    If we go by the above steps, the same in Azure will be as below:

    1. Create an Azure VM and install X-UI --> You already have this.
    2. Get a domain name --> You already have this.
    3. Create a DNS A record pointing from your host/domain name to your VM's Public IP --> I believe you already have this as well.
    4. Now, to add your domain to Azure CDN, you can follow the steps described below.

    To add your domain to Azure CDN:

    • Create an Azure CDN profile and add your VM as an endpoint to it with origin type "Custom origin" and origin host header as the VM's Public IP as below:

    https://learn.microsoft.com/en-us/azure/cdn/cdn-create-new-endpoint?toc=%2Fazure%2Ffrontdoor%2FTOC.json

    enter image description here

    • Then you can add your custom domain to Azure CDN following the below tutorial:

    https://learn.microsoft.com/en-us/azure/cdn/cdn-map-content-to-custom-domain?toc=%2Fazure%2Ffrontdoor%2FTOC.json&tabs=dns-provider%2Cazure-portal%2Cazure-portal-cleanup

    • Finally, you can enable the HTTPS protocol for the newly added custom domain that you associated with your Azure CDN endpoint following the below tutorial:

    https://learn.microsoft.com/en-us/azure/cdn/cdn-custom-ssl?tabs=option-1-default-enable-https-with-a-cdn-managed-certificate

    Kindly let us know if the above helps or you need further assistance on this issue.


    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.