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!

有帮助吗?

解决方案

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/

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top