Version information
released Jun 16th 2022
This version is compatible with:
- Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
- Puppet >= 6.21.0 < 8.0.0
Start using this module
Add this module to your Puppetfile:
mod 'puppetfinland-knockd', '1.0.1'
Learn more about managing modules with a PuppetfileDocumentation
puppetfinland/knockd — version 1.0.1 Jun 16th 2022
puppet-knockd
This module manages knockd.
Examples
Open SSH port to any IP that provides the correct knock sequence, then close it automatically after 30 seconds:
class { 'knockd':
interface => $facts['networking']['primary'],
}
knockd::sequence { 'openCloseSSH':
sequence => '2222,3333,4444',
seq_timeout => 15,
start_command => '/sbin/iptables -A INPUT -s %IP% -p tcp --dport ssh -j ACCEPT',
cmd_timeout => 30,
stop_command => '/sbin/iptables -D INPUT -s %IP% -p tcp --dport ssh -j ACCEPT',
}
The stop_command is not mandatory, but required for automatic cleanup. See class documentation for additional options. Use two knockd::sequence resources without a stop_command if you want one sequence to open a port, and another one to close a port.
Copyright
- Copyright 2015 Alessio Cassibba (X-Drum), unless otherwise noted.
- Copyright 2022 OpenVPN Inc.
Dependencies
- puppetlabs-concat (>= 6.0.0 < 8.0.0)
- puppetlabs-stdlib (>= 7.0.0 < 9.0.0)
Copyright (C) 2014 Alessio Cassibba (X-Drum) 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.