Virtual plugin
Enables the use of "virtual" Streams and "virtual" Actions.
A virtual action feeds a virtual stream.
It permits to have a second-level stream to perform another actions. This second-level permits for example to ban recidivist IPs for a longer time.
systemd options
This plugin does not require any systemd option.
{
plugins: {
virtual: {
path: '/usr/bin/reaction-plugin-virtual',
},
},
}
plugins:
virtual:
path: /usr/bin/reaction-plugin-virtual
Configuration
First setup one or more virtual streams:
{
streams: {
recidive: {
type: 'virtual',
filters: {
// ...
}
},
},
}
streams:
recidive:
type: virtual
filters:
# ...
Then you can add actions that will feed this virtual stream:
{
streams: {
ssh: {
// ...
filters: {
failedlogin: {
// ...
actions: banFor('4h') + {
recidive: {
send: '<ip>',
to: 'recidive',
}
}
}
}
}
}
}
streams:
ssh:
# ...
filters:
failedlogin:
# ...
actions:
ban:
# ...
unban:
# ...
recidive:
send: '<ip>'
to: recidive
send must be a string that can contain patterns enclosed in <>, just as Filter regex and Action cmd.
to must be the name of a virtual stream.