Delen via


Voorbereiden van extensie-host in Azure Stack Hub

De extensiehost beveiligt Azure Stack Hub door het aantal vereiste TCP/IP-poorten te verminderen. In dit artikel wordt beschreven hoe u Azure Stack Hub voorbereidt op de extensiehost die automatisch wordt ingeschakeld via een Azure Stack Hub-updatepakket na de 1808-update. Dit artikel is van toepassing op Azure Stack Hub-updates 1808, 1809 en 1811.

Certificaatvereisten

De extensiehost implementeert twee nieuwe domeinnaamruimten om unieke hostvermeldingen voor elke portalextensie te garanderen. Voor de nieuwe domeinnaamruimten zijn twee extra jokertekencertificaten vereist om veilige communicatie te garanderen.

De tabel bevat de nieuwe naamruimten en de bijbehorende certificaten:

Uitrolmap Vereist certificaatonderwerp en alternatieve namen van certificaatonderwerp (SAN) Bereik (per regio) Subdomeinnaamruimte
Host voor beheerdersuitbreiding *.adminhosting.<regio>.<fqdn> (Wildcard-SSL-certificaten) Host voor beheerdersuitbreiding adminhosting.<regio>.<fqdn>
Host van openbare extensie *.hosting.<regio>.<fqdn> (Wildcard SSL-certificaten) Host van openbare extensie gastvrijheid.<regio>.<>

Zie voor gedetailleerde vereisten de certificaatvereisten voor de openbare-sleutelinfrastructuur van Azure Stack Hub .

Aanvraag voor certificaatondertekening maken

Met het hulpprogramma Gereedheidscontrole voor Azure Stack Hub kunt u een aanvraag voor certificaatondertekening maken voor de twee nieuwe en vereiste SSL-certificaten. Volg de stappen in het artikel het genereren van aanvragen voor ondertekening van azure Stack Hub-certificaten.

Notitie

U kunt deze stap overslaan, afhankelijk van hoe u uw SSL-certificaten hebt aangevraagd.

Nieuwe certificaten valideren

  1. Open PowerShell met verhoogde machtigingen voor de host van de hardwarelevenscyclus of het Azure Stack Hub-beheerwerkstation.

  2. Voer de volgende cmdlet uit om het hulpprogramma Gereedheidscontrole voor Azure Stack Hub te installeren:

    Install-Module -Name Microsoft.AzureStack.ReadinessChecker
    
  3. Voer het volgende script uit om de vereiste mapstructuur te maken:

    New-Item C:\Certificates -ItemType Directory
    
    $directories = 'ACSBlob','ACSQueue','ACSTable','Admin Portal','ARM Admin','ARM Public','KeyVault','KeyVaultInternal','Public Portal', 'Admin extension host', 'Public extension host'
    
    $destination = 'c:\certificates'
    
    $directories | % { New-Item -Path (Join-Path $destination $PSITEM) -ItemType Directory -Force}
    

    Notitie

    Als u implementeert met Microsoft Entra ID Federated Services (AD FS), moeten de volgende mappen worden toegevoegd aan $directories in het script: ADFS, Graph.

  4. Plaats de bestaande certificaten, die u momenteel in Azure Stack Hub gebruikt, in de juiste mappen. Plaats bijvoorbeeld het ARM--certificaat van de-beheerder in de map Arm Admin. Plaats vervolgens de zojuist gemaakte hostingcertificaten in de Admin extension host en Public extension host mappen.

  5. Voer de volgende cmdlet uit om de certificaatcontrole te starten:

    $pfxPassword = Read-Host -Prompt "Enter PFX Password" -AsSecureString 
    
    Start-AzsReadinessChecker -CertificatePath c:\certificates -pfxPassword $pfxPassword -RegionName east -FQDN azurestack.contoso.com -IdentitySystem AAD
    
  6. Controleer de uitvoer om te zien of alle certificaten alle tests doorstaan.

Extensie-hostcertificaten importeren

Gebruik een computer die verbinding kan maken met het bevoegde Eindpunt van Azure Stack Hub voor de volgende stappen. Zorg ervoor dat u toegang hebt tot de nieuwe certificaatbestanden vanaf die computer.

  1. Gebruik een computer die verbinding kan maken met het bevoegde Eindpunt van Azure Stack Hub voor de volgende stappen. Zorg ervoor dat u vanaf die computer toegang hebt tot de nieuwe certificaatbestanden.

  2. Open PowerShell ISE om de volgende scriptblokken uit te voeren.

  3. Importeer het certificaat voor het hosteindpunt van de beheerder.

    
    $CertPassword = read-host -AsSecureString -prompt "Certificate Password"
    
    $CloudAdminCred = Get-Credential -UserName <Privileged endpoint credentials> -Message "Enter the cloud domain credentials to access the privileged endpoint."
    
    [Byte[]]$AdminHostingCertContent = [Byte[]](Get-Content c:\certificate\myadminhostingcertificate.pfx -Encoding Byte)
    
    Invoke-Command -ComputerName <PrivilegedEndpoint computer name> `
    -Credential $CloudAdminCred `
    -ConfigurationName "PrivilegedEndpoint" `
    -ArgumentList @($AdminHostingCertContent, $CertPassword) `
    -ScriptBlock {
            param($AdminHostingCertContent, $CertPassword)
            Import-AdminHostingServiceCert $AdminHostingCertContent $certPassword
    }
    
  4. Importeer het certificaat voor het hostingeindpunt:

    $CertPassword = read-host -AsSecureString -prompt "Certificate Password"
    
    $CloudAdminCred = Get-Credential -UserName <Privileged endpoint credentials> -Message "Enter the cloud domain credentials to access the privileged endpoint."
    
    [Byte[]]$HostingCertContent = [Byte[]](Get-Content c:\certificate\myhostingcertificate.pfx  -Encoding Byte)
    
    Invoke-Command -ComputerName <PrivilegedEndpoint computer name> `
    -Credential $CloudAdminCred `
    -ConfigurationName "PrivilegedEndpoint" `
    -ArgumentList @($HostingCertContent, $CertPassword) `
    -ScriptBlock {
            param($HostingCertContent, $CertPassword)
            Import-UserHostingServiceCert $HostingCertContent $certPassword
    }
    

DNS-configuratie bijwerken

Notitie

Deze stap is niet vereist als u DNS-zonedelegering hebt gebruikt voor DNS-integratie.

Als afzonderlijke host A-records zijn geconfigureerd voor het publiceren van Azure Stack Hub-eindpunten, moet u twee extra host A-records maken:

IP Hostnaam Typ
<IP> *. Adminhosting.<Regio>.<FQDN-> Een
<IP-> *. Gastvrijheid.<Regio>.<FQDN-> Een

Toegewezen IP-adressen kunnen worden opgehaald met behulp van het bevoegde eindpunt door de cmdlet uit te voeren Get-AzureStackStampInformation.

Poorten en protocollen

Het artikel Azure Stack Hub-datacenterintegratie - Publiceer eindpunten bespreekt de poorten en protocollen die inkomend verkeer vereisen om Azure Stack Hub te publiceren vóór de uitrol van de extensiehost.

Nieuwe eindpunten publiceren

Er moeten twee nieuwe eindpunten worden gepubliceerd via uw firewall. De toegewezen IP-adressen uit de openbare VIP-pool kunnen worden opgehaald met behulp van de volgende code die moet worden uitgevoerd vanaf het bevoegde eindpunt van uw Azure Stack Hub omgeving.

# Create a PEP Session
winrm s winrm/config/client '@{TrustedHosts= "<IpOfERCSMachine>"}'
$PEPCreds = Get-Credential
$PEPSession = New-PSSession -ComputerName <IpOfERCSMachine> -Credential $PEPCreds -ConfigurationName "PrivilegedEndpoint" -SessionOption (New-PSSessionOption -Culture en-US -UICulture en-US)

# Obtain DNS Servers and extension host information from Azure Stack Hub Stamp Information and find the IPs for the Host Extension Endpoints
$StampInformation = Invoke-Command $PEPSession {Get-AzureStackStampInformation} | Select-Object -Property ExternalDNSIPAddress01, ExternalDNSIPAddress02, @{n="TenantHosting";e={($_.TenantExternalEndpoints.TenantHosting) -replace "https://*.","testdnsentry"-replace "/"}},  @{n="AdminHosting";e={($_.AdminExternalEndpoints.AdminHosting)-replace "https://*.","testdnsentry"-replace "/"}},@{n="TenantHostingDNS";e={($_.TenantExternalEndpoints.TenantHosting) -replace "https://",""-replace "/"}},  @{n="AdminHostingDNS";e={($_.AdminExternalEndpoints.AdminHosting)-replace "https://",""-replace "/"}}
If (Resolve-DnsName -Server $StampInformation.ExternalDNSIPAddress01 -Name $StampInformation.TenantHosting -ErrorAction SilentlyContinue) {
    Write-Host "Can access AZS DNS" -ForegroundColor Green
    $AdminIP = (Resolve-DnsName -Server $StampInformation.ExternalDNSIPAddress02 -Name $StampInformation.AdminHosting).IPAddress
    Write-Host "The IP for the Admin Extension Host is: $($StampInformation.AdminHostingDNS) - is: $($AdminIP)" -ForegroundColor Yellow
    Write-Host "The Record to be added in the DNS zone: Type A, Name: $($StampInformation.AdminHostingDNS), Value: $($AdminIP)" -ForegroundColor Green
    $TenantIP = (Resolve-DnsName -Server $StampInformation.ExternalDNSIPAddress01 -Name $StampInformation.TenantHosting).IPAddress
    Write-Host "The IP address for the Tenant Extension Host is $($StampInformation.TenantHostingDNS) - is: $($TenantIP)" -ForegroundColor Yellow
    Write-Host "The Record to be added in the DNS zone: Type A, Name: $($StampInformation.TenantHostingDNS), Value: $($TenantIP)" -ForegroundColor Green
}
Else {
    Write-Host "Cannot access AZS DNS" -ForegroundColor Yellow
    $AdminIP = (Resolve-DnsName -Name $StampInformation.AdminHosting).IPAddress
    Write-Host "The IP for the Admin Extension Host is: $($StampInformation.AdminHostingDNS) - is: $($AdminIP)" -ForegroundColor Yellow
    Write-Host "The Record to be added in the DNS zone: Type A, Name: $($StampInformation.AdminHostingDNS), Value: $($AdminIP)" -ForegroundColor Green
    $TenantIP = (Resolve-DnsName -Name $StampInformation.TenantHosting).IPAddress
    Write-Host "The IP address for the Tenant Extension Host is $($StampInformation.TenantHostingDNS) - is: $($TenantIP)" -ForegroundColor Yellow
    Write-Host "The Record to be added in the DNS zone: Type A, Name: $($StampInformation.TenantHostingDNS), Value: $($TenantIP)" -ForegroundColor Green
}
Remove-PSSession -Session $PEPSession

Voorbeelduitvoer

Can access AZS DNS
The IP for the Admin Extension Host is: *.adminhosting.\<region>.\<fqdn> - is: xxx.xxx.xxx.xxx
The Record to be added in the DNS zone: Type A, Name: *.adminhosting.\<region>.\<fqdn>, Value: xxx.xxx.xxx.xxx
The IP address for the Tenant Extension Host is *.hosting.\<region>.\<fqdn> - is: xxx.xxx.xxx.xxx
The Record to be added in the DNS zone: Type A, Name: *.hosting.\<region>.\<fqdn>, Value: xxx.xxx.xxx.xxx

Notitie

Breng deze wijziging aan voordat u de extensiehost inschakelt. Hierdoor kunnen de Azure Stack Hub-portals continu toegankelijk zijn.

Eindpunt (VIP) Protocol Poorten
Hosting van beheerders HTTPS 443
Hosten HTTPS 443

Bestaande publicatieregels bijwerken (na inschakelen van extensiehost)

Notitie

Het 1808 Azure Stack Hub-updatepakket schakelt nog geen extensiehost in. Hiermee kunt u de extensiehost voorbereiden door de vereiste certificaten te importeren. Sluit geen poorten voordat de extensiehost automatisch wordt ingeschakeld via een Azure Stack Hub-updatepakket na de 1808-update.

De volgende bestaande eindpuntpoorten moeten worden gesloten in uw bestaande firewallregels.

Notitie

Het is raadzaam deze poorten te sluiten na een geslaagde validatie.

Eindpunt (VIP) Protocol Havens
Portal (beheerder) HTTPS 12495
12499
12646
12647
12648
12649
12650
13001
13003
13010
13011
13012
13020
13021
13026
30015
Portal (gebruiker) HTTPS 12495
12649
13001
13010
13011
13012
13020
13021
30015
13003
Azure Resource Manager (beheerder) HTTPS 30024
Azure Resource Manager (gebruiker) HTTPS 30024

Volgende stappen

  • Meer informatie over Firewall-integratie.
  • Meer informatie over het genereren van aanvraagverzoeken voor ondertekening van certificaten voor Azure Stack Hub .