This cookbook configures Windows firewall rules.
This resource is now built into chef-client 14.7+. If you are running Chef 14.7+ you no longer need to depend on this cookbook in your infrastructure of the windows_firewall_rule resource. All future development of the windows_firewall resource will take place directly in the chef-client. We highly recommen upgrading your chef-client for the latest and greatest functionality.
:create
- creates a firewall rule:delete
- deletes a firewall rulerule_name
The name of the firewall rule name to create. If not supplied the resource block name will be used.description
The firewall rule description. Optional.local_address
Can be 'any', a specific address, a subnet in CIDR or ip/mask notation, or a range separated by '-'local_port
Can be 'any', an integer or one of { rpc | rpc-epmap | iphttps | teredo | [ ,... ] }remote_address
Can be 'any', a specific address, a subnet in CIDR or ip/mask notation, or a range separated by '-''remote_port
Can be 'any', an integer or one of { rpc | rpc-epmap | iphttps | teredo | [ ,... ] }direction
Direction of the rule. Can be in or out. Default is in.protocol
Can by 'any', an integer, or one of { | icmpv4 | icmpv6 | icmpv4:type,code | icmpv6:type,code | tcp | udp }firewall_action
Can be allow, block, or bypass. Default is 'allow'profile
Can be public, private, domain, or anyprogram
The path to the program.service
The short name of the service, or 'any'interface_type
Can be any, wireless, lan, or ras windows_firewall_rule 'Apache' do
local_port '8080'
protocol 'TCP'
firewall_action :allow
end
windows_firewall_rule 'Enable SSH Access' do
rule_name 'ssh'
local_port '22'
protocol 'TCP'
firewall_action :allow
end
windows_firewall_rule 'Remove SSH Access' do
rule_name 'ssh'
action :delete
end
Copyright:: 2013-2015 Matt Clifton
Copyright:: 2018 Chef Software, Inc.
Copyright:: 2018, Intility AS
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.