It differs from port knocking in the following ways:
First set up the appropriate tumbler.conf (by default /etc/tumblerd.conf):
# Comments start with #
#
# The common section contains configuration options
# for the tumblerd daemon, here we set the UDP
# port to listen on to 8675 and a log file
[common]
port = 8675
log = /var/log/tumblerd.log
# Each door that a user can knock on is defined by
# a unique [door-X] section, the first section is
# for opening the SSH port, and second for closing
#
# Each door has a secret (i.e. the password for this
# door that is part of the knock) and a command to
# execute.
#
# In the command it's possible to use the macros
# %IP% for the IP address of the person who knocked and
# %NAME% for the name of the door (in the first door
# here the name is open-ssh)
[door-open-ssh]
secret = open-pAsSwOrD
command = /usr/sbin/iptables -A INPUT -p tcp -s %IP% --dport 22 -j ACCEPT
[door-close-ssh]
secret = close-pAsSwOrD
command = /usr/sbin/iptables -D INPUT -p tcp -s %IP% --dport 22 -j ACCEPT
Then run tumblerd (or tumblerd --config /path/to/file if the config file isn't in the standard place).
To knock on the open door the remote user does the following:
tumbler --open tumbler://host:8675/
where host is the host on which tumblerd is running. The user will be prompted for the secret (in this case open-pAsSwOrD). Alternatively it's possible to specify the secret on the command line as follows:
tumbler --open tumbler://open-pAsSwOrD@host:8675/
That's it.
To close the port again the user would use the close-ssh door's secret.
The tumbler protocol consists of a single message sent as a UDP datagram that contains a string identifying the tumbler protocol version (currently 1) and a hash value. For example,
TUMBLER1: 844c17eee03d848cc0a60e90f608d5ea11f417d9bf0d2c1af2b52c665245bf22
The hash is a SHA 256 secure hash of the following three items:
The inclusion of the IP address of the sender means that a sniffed message cannot be reused from a different IP address, the inclusion of the time means that messages automatically expire and the inclusion of the secret means that an attacker needs to obtain the password.
Hence the security of tumbler is the same as password security: choose a good secret for each door and change it often! The tumblerd implementation prevents the reuse of a hash within the same minute so that each command is only executed once.
If tumblerd determines that the hash is valid it executes the associated command. There is no response positive or negative to the sending of a message.
tumblerdand it will read the configuration file /etc/tumblerd.conf. tumblerd also has two command line options.
Blank lines and anything after a # are ignored in the configuration file.
Within each section configuration parameters in the form param = val are accepted. Whitespace is stripped before and after the parameter name and value.
Each section has certain permitted parameters:
See the example above for a complete configuration file.