-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
Disable firewall on Windows #141
Comments
Hi there, we are running into the same issue here. If we just define the following block on a recipe for windows: # disable platform default firewall
firewall 'default' do
action :disable
end It fails. If we add the following code: # defaults
firewall 'default'
# disable platform default firewall
firewall 'default' do
action :disable
end it completes, BUT, it runs the defaults (enable, start) before the (disable) on every chef-client run. We understand this is not the most idempotent/ideal scenario. We also tried with the following code firewall 'default' do
enabled false
end and then the recipe does nothing. |
Thank you @warp3r ... I tried, copying and pasting what you wrote but still getting error
|
This seems to be an issue where disabling the firewall service also disables test-kitchen's ability to execute WinRM commands on the instance. I'm unfortunately not knowledgeable enough to know the best way to disable the firewall while still preserving connectivity. I'd be happy to fix the implementation if someone is willing to walk through the proper steps in this issue. |
I tried disabling the MpsSvc Windows service using Chef resource but also didn't work. In the end had to resort to powershell, this is what my disable recipe looks like:
|
i'm also having this issue, I get a WinRM error immediately after disabling the firewall... |
@stenio123 -- we're currently doing
Is this the wrong thing to do on Windows? I'd love some feedback from folks here using Windows. Thanks! |
When I run
on Ubuntu where a previous version had enable the ufw firewall, I would expect it to be then disabled. However while there's no error, ufw is still enabled (active) after running chef-client. |
@baltar Please open a separate issue; this issue is specifically about the Windows provider and deciding what to do. |
The issue here appears to be in
The My vote would be to only call |
Cookbook version
firewall 2.5.2
[Version of the cookbook where you are encountering the issue]
Chef-client version
12.8.1
[Version of chef-client in your environment]
Platform Details
Windows 2012 r2
[Operating system distribution and release version. Cloud provider if running in the cloud]
Scenario:
[What you are trying to achieve and you can't?]
Disabling firewall on windows using
Steps to Reproduce:
[If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this cookbook or any resources it includes?]
Expected Result:
[What are you expecting to happen as the consequence of above reproduction steps?]
Successful kitchen run, all ports open on windows
Actual Result:
The text was updated successfully, but these errors were encountered: