TMAegis
Više pravila za iis

Microsoft IIS

TMA-IIS-1.2

Ensure 'Host headers' are on all sites

SrednjaNivo 1Automatskaiis

Opis

Host headers provide the ability to host multiple websites on the same IP address and port. It is recommended that host headers be configured for all sites. Note: Wildcard host headers are now supported. Every http binding must include a host name (IP:port:host); bindings such as *:80: fail. PowerShell 5.1 with the WebAdministration module; run elevated.

Kako se proverava

Metod provere: Komanda ljuske

shell
Import-Module WebAdministration -ErrorAction Stop; $bad = @(Get-WebBinding | Where-Object { $_.protocol -eq 'http' -and ($_.bindingInformation -split ':')[2] -eq '' }); if ($bad.Count -eq 0) { 'compliant' } else { 'noncompliant' }
Očekivani izlaz
compliant

Kako se ispravlja

Metod ispravke: Smernica ili zakrpa infrastrukture

Set-WebBinding -Name '<site>' -BindingInformation '*:80:' -PropertyName HostHeader -Value '<fqdn>'

Svojstva

Operativni sistemi
Bilo koji
Oznake
iisnetwork
Referenca
CIS Microsoft IIS 10 Benchmark v1.2.1 - 1.2 Ensure 'Host headers' are on all sites

Proverite ovaj računar

Pokrenite ovo na računaru za koji imate dozvolu za proveru. Skeniranje radi u režimu samo za čitanje.

shell
tmaegis scan --target iis