Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Server 2019 and the Windows Defender Firewall service #108

Open
storm49152 opened this issue Oct 9, 2020 · 0 comments
Open

Windows Server 2019 and the Windows Defender Firewall service #108

storm49152 opened this issue Oct 9, 2020 · 0 comments

Comments

@storm49152
Copy link

The documentation says that the module is tested up to Windows Server 2016, and the behavior for the firewall service changed in Windows 2019.

In Windows Server 2019 it is not possible to stop the "Windows Defender Firewall" (mpssvc) service. So if you use this module and try to do "ensure => stopped", it will fail:

Error: Failed to transition the MpsSvc service to the SERVICE_STOPPED state. Detail: Failed to open a handle to the service:  Access is denied.
Error: /Stage[main]/Windows_firewall/Service[windows_firewall]/ensure: change from 'running' to 'stopped' failed: Failed to transition the MpsSvc service to the SERVICE_STOPPED state. Detail: Failed to open a handle to the service:  Access is denied.

This happens on a fresh server, running puppet agent -t as Administrator. Also, in "Services" all configuration options for this service are grayed out.

Maybe the module can be changed to alert the user that this action cannot be done.

For completeness, there is a registry setting that disables the service from starting:

  • Open the Registry Editor and go to folder: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\mpssvc.
  • Set entry Start key from REG_DWORD 2 to REG_DWORD 4. This changes the Startup typefromAutomatictoDisabled`. [*]
  • Reboot the server.

[*] Valid values:
0 = Boot
1 = System
2 = Automatic
3 = Manual
4 = Disabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant