Today I have released to the public my first puppet module:
- juasiepo-knockd on github
- juasiepo-knockd on puppetlabs’ forge
It installs and configures knockd (a port knocking software).
It is very easy to use as it already has some default values making it working properly out-of-the box.
It is enough including the module in your configuration (nodes.pp or ENC)
include knockd
Also default values can be overriden:
class { 'knockd':
sequence_open => '4000:udp,4000:tcp,4000:udp',
sequence_close => '4001:tcp,4001:udp,4001:tcp',
port_to_manage => '22',
}
In this case, knockd will open the 22 port when the server receives the 4000:udp,4000:tcp,4000:udp sequence and close it when receives 4001:tcp,4001:udp,4001:tcp
It also install a port knocker client
To open the port:
knock hostname 4000:udp 4000:tcp ,4000:udp
To close the port:
knock hostname 4001:tcp 4001:udp 4001:tcp