문제

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