Inhaltsverzeichnis

4.4 IIS-Umleitung

Konfiguration für nicht-Gateway-Traffic.

IIS Binding

IIS lauscht auf Port 8443 (intern, nicht öffentlich):

# IIS Site Binding ändern
Import-Module WebAdministration
Set-WebBinding -Name "Default Web Site" -BindingInformation "*:8443:" -PropertyName Port -Value 8443

Proxy-Regel

Alle nicht-Gateway-Requests werden zu IIS weitergeleitet:

{
  "Match": {
    "Default": true
  },
  "Target": {
    "Type": "Http",
    "Url": "http://127.0.0.1:8443",
    "PreserveHostHeader": true,
    "ForwardClientCertificate": true
  }
}

Header-Weiterleitung

{
  "ForwardHeaders": {
    "X-Forwarded-For": true,
    "X-Forwarded-Proto": true,
    "X-Client-Cert": true,
    "X-Client-Cert-DN": true
  }
}

Sicherheit

IIS darf nur von localhost erreichbar sein:

<!-- web.config -->
<security>
  <ipSecurity allowUnlisted="false">
    <add ipAddress="127.0.0.1" allowed="true"/>
  </ipSecurity>
</security>