Question

I want to have a set of ports range (1001-1020, 80-90). I tried but could do all range only add every port manual by itself: 1001,1002,1003 etc. How do I set it as a range?

Question # 2 How do I save a list of tcp / http / rdp to be auto loaded when a new VM is used? AWS has a function when loading a new image to use a specific basket of internet rules. I didn't find a way to do this in azure. can that be done in azure as well?

Thanks!

Was it helpful?

Solution

This is something you would typically do with PowerShell. Here's an example that reads the endpoints from a CSV file and adds it to a VM:

$endpoints = Import-Csv $csvFile -header Name,Protocol,PublicPort,LocalPort -delimiter ';' | foreach {
    New-Object PSObject -prop @{
        Name = $_.Name;
        Protocol = $_.Protocol;
        PublicPort = [int32]$_.PublicPort;
        LocalPort = [int32]$_.LocalPort;
    }
}

# Add each endpoint.
Foreach ($endpoint in $endpoints)
{
     Add-AzureEndpoint -VM $vm -Name $endpoint.Name -Protocol $endpoint.Protocol.ToLower() -PublicPort $endpoint.PublicPort -LocalPort $endpoint.LocalPort
}

More information is available here: http://fabriccontroller.net/blog/posts/adding-multiple-endpoints-to-your-windows-azure-virtual-machines-by-using-a-csv-file/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top