Configuration SSL IIS Windows

Securisez votre serveur IIS avec SSL/TLS.

IIS (Internet Information Services) est le serveur web de Microsoft pour Windows Server. La configuration SSL passe par le gestionnaire IIS et parfois PowerShell.

Ce guide couvre l'installation de certificats et la configuration HTTPS sur IIS, que ce soit pour des certificats commerciaux ou Let's Encrypt.

Nous verrons aussi comment configurer les protocoles et chiffres pour une securite optimale.

Concepts IIS SSL

Les elements cles de SSL sur IIS :

  • Binding : association d'un certificat a un site sur le port 443.
  • Certificate Store : le magasin Windows ou sont stockes les certificats.
  • MMC : Microsoft Management Console pour gerer les certificats.
  • Schannel : le provider SSL/TLS de Windows configure via le registre.

Integration Windows

Avantages de SSL sur IIS :

  • Integration AD : certificats deployes via Group Policy.
  • GUI intuitive : gestion visuelle via IIS Manager.
  • PowerShell : automatisation possible pour les deploiements.
  • Support Microsoft : documentation et support enterprise.

Installation du Certificat

Etapes pour configurer SSL sur IIS :

  1. Obtenir le certificat : CSR via IIS ou certificat PFX pret.
  2. Importer dans le store : utilisez MMC ou IIS Manager.
  3. Creer le binding : associez le certificat au site web.
  4. Configurer Schannel : desactivez les vieux protocoles.

Configuration PowerShell

Automatisation avec PowerShell :

# Importer un certificat PFX
$password = ConvertTo-SecureString -String "password" -Force -AsPlainText
Import-PfxCertificate -FilePath "C:\cert.pfx" -CertStoreLocation Cert:\LocalMachine\My -Password $password

# Creer le binding HTTPS
New-WebBinding -Name "Default Web Site" -Protocol "https" -Port 443 -HostHeader "example.com"

# Associer le certificat au binding
$cert = Get-ChildItem -Path Cert:\LocalMachine\My | Where-Object {$_.Subject -like "*example.com*"}
$binding = Get-WebBinding -Name "Default Web Site" -Protocol "https"
$binding.AddSslCertificate($cert.Thumbprint, "My")

# Desactiver TLS 1.0 et 1.1 (reboot requis)
New-Item "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server" -Force
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server" -Name "Enabled" -Value 0

New-Item "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server" -Force
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server" -Name "Enabled" -Value 0

Utilisez IIS Crypto de Nartac pour configurer Schannel graphiquement.

Bonnes Pratiques IIS

Conseils pour IIS SSL :

  • Utilisez IIS Crypto : outil gratuit pour configurer les protocoles et chiffres facilement.
  • Desactivez TLS 1.0/1.1 : via le registre Schannel ou IIS Crypto.
  • Activez HTTP/2 : disponible dans Windows Server 2016+.
  • Redirection HTTP : utilisez URL Rewrite pour rediriger vers HTTPS.

Checklist IIS SSL

  • Certificat importe dans le store
  • Binding HTTPS cree
  • Certificat associe au binding
  • TLS 1.0/1.1 desactives
  • Chiffres modernes configures
  • Redirection HTTP vers HTTPS

Questions Frequentes

Comment generer une CSR sur IIS ?

IIS Manager > Server Certificates > Create Certificate Request.

J'ai un fichier PEM, pas PFX ?

Convertissez avec openssl : openssl pkcs12 -export -out cert.pfx -inkey key.pem -in cert.pem

Le certificat n'apparait pas ?

Verifiez qu'il est dans le store "Personal" (My) de la machine locale.

Comment utiliser Let's Encrypt sur IIS ?

Utilisez win-acme (wacs) pour l'automatisation sur Windows.

Schannel ou groupe de politiques ?

Schannel via registre ou IIS Crypto pour un serveur unique, GPO pour un deploiement masse.

Dois-je redemarrer apres modification Schannel ?

Oui, les modifications Schannel necessitent un reboot pour prendre effet.

IIS Securise

IIS offre une plateforme robuste pour l'hebergement web securise avec une bonne integration Windows.

Surveillez l'expiration de vos certificats avec MoniTao pour eviter les interruptions de service.

Prêt à dormir sur vos deux oreilles ?

Commencez gratuitement, sans carte bancaire.