bpeter

WinRM über https

Hallo,
ich würde gerne WinRM nur über https (Port 5986) erlauben. Dazu bräuchte ich eure Hilfe, da meine Konfiguration nicht funktioniert.
Befehl:
winrm get winrm/config

Ergebnis:
Config
MaxEnvelopeSizekb = 500
MaxTimeoutms = 60000
MaxBatchItems = 32000
MaxProviderRequests = 4294967295
Client
NetworkDelayms = 5000
URLPrefix = wsman
AllowUnencrypted = false
Auth
Basic = true
Digest = true
Kerberos = true
Negotiate = true
Certificate = true
CredSSP = false
DefaultPorts
HTTP = 5985
HTTPS = 5986
TrustedHosts
Service
RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)
MaxConcurrentOperations = 4294967295
MaxConcurrentOperationsPerUser = 1500
EnumerationTimeoutms = 240000
MaxConnections = 300
MaxPacketRetrievalTimeSeconds = 120
AllowUnencrypted = false
Auth
Basic = false
Kerberos = true
Negotiate = true
Certificate = true
CredSSP = false
CbtHardeningLevel = Relaxed
DefaultPorts
HTTP = 5985
HTTPS = 5986
IPv4Filter = *
IPv6Filter = *
EnableCompatibilityHttpListener = false
EnableCompatibilityHttpsListener = false
CertificateThumbprint = de 6d 6b 50 e2 ba 4a ce a1 5c 6e 09 35 96 6d 181a 48 57 0e
AllowRemoteAccess = true
Winrs
AllowRemoteShellAccess = true
IdleTimeout = 7200000
MaxConcurrentUsers = 2147483647
MaxShellRunTime = 2147483647
MaxProcessesPerShell = 2147483647
MaxMemoryPerShellMB = 2147483647
MaxShellsPerUser = 2147483647

Sobald ich von meinem Server auf das Zielsystem über Port 5986 zugreifen will, kommt die Meldung:
The client cannot connect to the destination specified in the request. Verify that the
service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig".


Beides Windows 2022 Server

Jemand eine Idee?

Im Voraus besten Dank
Peter
Auf Facebook teilen
Auf X (Twitter) teilen
Auf Reddit teilen
Auf Linkedin teilen

Content-ID: 672704

Url: https://administrator.de/forum/winrm-ueber-https-672704.html

Ausgedruckt am: 03.05.2025 um 00:05 Uhr

Delta9
Delta9 02.05.2025 um 12:35:44 Uhr
Goto Top
Hi,
schaust du hier

Bei https brauchst du ja ein Zertifikat und das fehlt evtl.
BPeter
BPeter 02.05.2025 um 12:40:11 Uhr
Goto Top
Hi,
Zertifikat ist vorhanden. Den Artikel hatte ich mir auch schon durchgelesen.
Delta9
Delta9 02.05.2025 um 13:04:13 Uhr
Goto Top
Passt denn das Zertifikat( Winrm enumerate winrm/config/listener) ?
Ist der Port 5986 eingehend frei? Sprichst du den Server via IP oder FQDN an?
BPeter
BPeter 02.05.2025 um 15:03:38 Uhr
Goto Top
Ja, das Zertifkat und ...listener haben den gleichen Fingerabdruck
Port 5986:
Test-NetConnection Servename -Port 5986 -->TcpTestSucceeded : True
Die Windows Firewall ist nicht konfiguriert.
Wenn man irgendwo im Log etwas lesen könnte, wäre das schon hilfreich.
AK-47.2
AK-47.2 02.05.2025 um 15:05:56 Uhr
Goto Top
Wie @Delta9 schon sagte:

1) Ist der Listener auf HTTPs vorbereitet?
2) Passt der Fingerprint des Zertifikates im Listener auch auf den Finngerprint des Zertifikates im lokalen Computerstore?
3) Angesprochen wird über FQDN, der CN im Zertifikat muss auf die WinRM Anfrage matchen.

Ich hab das so am Laufen, ich meine mich zur erinnern, dass es bestimmte Voraussetzungen für das Zertifikat gab, hast du das geprüft?

Ansonsten mal ein Test-Netconnection -Computername "Name des Computers" -Port 5986 per Powershell abfeuern und sicher gehen, dass 5896 eingehend auf ist.
BPeter
BPeter 02.05.2025 um 15:24:26 Uhr
Goto Top
zu 1: das Ergebnis hatte ich anfangs gepostet. Sieht für mich "Vorbereitet" aus.
zu 2: ja
zu 3: Im Zertifikat unter Subject steht der FQDN

"bestimmte Voraussetzungen" weiß ich jetzt nicht

Test-NetConnection Servename -Port 5986 -->TcpTestSucceeded : True