0

I have an app server (inside DMZ) which connected to a reverse proxy server (Windows server 2019, IIS with URL rewrite installed). The following firewall rules are configured between these 2 servers:

App--->reverse proxy (port 80 and 443)

App<---reverse proxy (port 80 and 443)

MS Office 2016 is installed on App server and our IT Admin give an batch file to me to activate it: C:\Windows\System32\cscript.exe "c:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs" /sethst:10.aa.bb.ccc

C:\Windows\System32\cscript.exe "c:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs" /act

I tried run it but failed. The following firewall rule also setup: Reverse proxy--->10.aa.bb.ccc (port 80 and 443)

Forward proxy has been config as below:

URL Rewrite setting

And when run the batch file, got the below error:

D:\MSO>C:\Windows\System32\cscript.exe "c:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs" /sethst:10.aa.bb.ccc Microsoft (R) Windows Script Host Version 5.812 Copyright (C) Microsoft Corporation. All rights reserved.

---Processing--------------------------

ERROR CODE: 0x80070005 ERROR DESCRIPTION: Run the following: cscript ospp.vbs /ddescr:0x80070005

---Exiting-----------------------------

D:\MSO>C:\Windows\System32\cscript.exe "c:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs" /act Microsoft (R) Windows Script Host Version 5.812 Copyright (C) Microsoft Corporation. All rights reserved.

---Processing--------------------------

Installed product key detected - attempting to activate the following product: SKU ID: dedfa23d-6ed1-45a6-85dc-63cae0546de6 LICENSE NAME: Office 16, Office16StandardVL_KMS_Client edition LICENSE DESCRIPTION: Office 16, VOLUME_KMSCLIENT channel Last 5 characters of installed product key: XXXXX ERROR CODE: 0xC004F074 ERROR DESCRIPTION: The Software Licensing Service reported that the product could not be activated. No Key Management Service (KMS) could be contacted. Please see the Application Event Log for additional information. To view the activation event history run: cscript ospp.vbs /dhistorykms NOTICE: A KB article has been detected for activation failure: 0xC004F074 FOR MORE INFORMATION PLEASE VISIT: http://support.microsoft.com/kb/2870357#Error0xC004F074


---Exiting-----------------------------

Is there anything wrong on the URL rewrite setting ? Or it cannot be done when activate thru batch file? Thanks a lot.

Regds

LAM Chi-fung

1 Answer 1

0

As far as I know, KMS (VLMCS) is not an HTTP-based service – it uses TCP port 1688 rather than 80/443 and speaks MS-RPC instead of HTTP (meaning, you cannot use reverse-proxying or URL rewriting because there aren't any URLs in the first place).

2
  • I should then add firewall rules: App--->Reverse proxy (port 1688) Reverse proxy---> 10.aa.bb.ccc (port 1688) ? Commented Jun 28, 2022 at 9:56
  • Yes, you'll need those firewall rules, but again the KMS protocol cannot be proxied by IIS; you need a TCP/stream proxy like "netsh portproxy" instead. (Actually, why are you using that proxy setup in general – why not just directly point the OS to your real KMS server's IP address?) Commented Jun 28, 2022 at 10:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .