cookbook 'knockd', '~> 0.2.1'
knockd (2) Versions 0.2.1 Follow2
Installs/Configures knockd
cookbook 'knockd', '~> 0.2.1', :supermarket
knife supermarket install knockd
knife supermarket download knockd
knockd cookbook
Installs and configures knockd.
Requirements
None
Platform
Tested on
- Ubuntu 12.04
- Ubuntu 13.04
- Debian 7.4
Usage
Include the knockd::default
recipe to start using knockd.
include_recipe 'knockd' knockd_sequence 'openHTTP' do sequence ['7000', '8000', '9000:tcp'] tcpflags :syn on_open '/sbin/iptables -A INPUT -s %IP% -p tcp --dport 80 -j ACCEPT' end knockd_sequence 'https' do sequence [ '2123', '2124:tcp', '2125:udp' ] tcpflags [ :syn, :ack ] on_open 'echo https open' end
Attributes
-
['knockd']['enabled']
- Enables or disables knockd. default true. -
['knockd']['interface']
- Make knockd listen to a specific interface. default nil.
Recipes
default
Provides LWRP for knockd. Note that by default, knockd service is disabled.
Definitions/Resources/Providers
knockd_sequence
Definition that constructs a sequence to be specified in the knockd configuration.
Actions
- :enable: adds sequence to configuration
- :disable: removes sequence from configuration
Attribute Parameters
- sequence: list of ports following the <port1>[:<tcp|udp>] syntax.
- port: alternative listing of ports.
- tcpflags: list of flags for tcp ports. Defaults to [:syn,:ack]
- seq_timeout: sequence timeout. Defaults to 30 seconds
- auto_close: if specified, causes on_close to be fired after N seconds. Defaults to off value -1.
- on_open: command to run when port is opened.
- on_close: command to run when port is closed. Only works with valid auto_close.
knockd_client
Performs a simple knock. Does this at the start of the resource section.
Actions
- :enable: performs knock sequence.
- :nothing: does nothing.
Attribute Parameters
- ip: Destination IP address.
- sequence: list of ports following the <port1>[:<tcp|udp>] syntax.
License & Authors
- Author:: Li-Te Chen (datacoda@gmail.com)
Copyright 2014-2016 Nephila Graphic, Li-Te Chen 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.
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
0.2.1 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.2.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.2.1 failed this metric
FC066: Ensure chef_version is set in metadata: knockd/metadata.rb:1
FC069: Ensure standardized license defined in metadata: knockd/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: knockd/resources/client.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: knockd/providers/client.rb:27
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.2.1 passed this metric
Testing File Metric
0.2.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.2.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.2.1 failed this metric
0.2.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.2.1 failed this metric
FC066: Ensure chef_version is set in metadata: knockd/metadata.rb:1
FC069: Ensure standardized license defined in metadata: knockd/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: knockd/resources/client.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: knockd/providers/client.rb:27
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.2.1 passed this metric
Testing File Metric
0.2.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.2.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.2.1 failed this metric
FC069: Ensure standardized license defined in metadata: knockd/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: knockd/resources/client.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: knockd/providers/client.rb:27
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.2.1 passed this metric
Testing File Metric
0.2.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.2.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.2.1 failed this metric
0.2.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number