Open docwho76 opened 7 years ago
I am unassigning myself here -- I could use someone more familiar with the Windows side of things in order to build out the build_rule
and rule_up_to_date
methods in the Windows helper.
On windows you must specify protocol version like:
protocol :icmpv4 or protocol :icmpv6
However this will generate other error, icmp rules must not specify 'port', I've submitted a pull request to fix this port issue: https://github.com/chef-cookbooks/firewall/pull/174
Thanks @alexandrezia,
This patch worked with charm, using windows 10.0.14393 (2016) :+1:
Thanks @alexandrezia , worked wonderfully using Windows 7.
Cookbook version
2.5.3
Chef-client version
12.18.31
Platform Details
Win 2012 (contrary to what your README.md says your code has worked on this platform fine)
Scenario:
Add ICMP firewall rules to only allow specific IP blocks
Steps to Reproduce:
Expected Result:
Firewall rules added to only allow ICMP from the specified icmp_host list
Actual Result:
Rule add fails in multiple ways.
You specify "icmp" where it should be "icmpv4"
You specify a "localport" and "remoteport" setting of "any", both of these are not needed at all and also causes the command to fail to add if you try to work around problem #1 by specifying protocol 1 instead of :icmp.
+firewall add rule name="ICMP v4 from Y.Y.Y.Y/23" description="ICMP v4 from Y.Y.Y.Y/23" dir=in service=any protocol=1 localip=any localport=any interfacetype=any remoteip=Y.Y.Y.Y/23 remoteport=any action=allow