Service Plugins¶
x84.fail2ban
¶
fail2ban module for x/84.
To enable, add to default.ini:
[fail2ban]
enabled = yes
The following options are available, but not required:
ip_blacklist
: space-separated list of IPs on permanent blacklist.ip_whitelist
: space-separated list of IPs to always allow.max_attempted_logins
: max no. of logins allowed for given time windowmax_attempted_logins_window
: the length (in seconds) of the time window for which logins will be tracked (sliding scale).initial_ban_length
: ban length (in seconds) when an IP is blacklisted.ban_increment_length
: amount of time (in seconds) to add to a ban on subsequent login attempts
-
x84.fail2ban.
get_fail2ban_function
()[source]¶ Return a function used to ban aggressively-connecting clients.
This is analogous to the ‘fail2ban’ utility, for example, telnet or ssh connect scanners.
Returns a function which may be passed an IP address, returning True if the connection from address
ip
should be accepted.Returns: function accepting ip address, returning boolean Return type: callable
x84.msgpoll
¶
x84net message poll for x/84.
-
x84.msgpoll.
do_poll
(networks)[source]¶ Message polling process.
Function is called periodically by
poller()
.
-
x84.msgpoll.
main
(background_daemon=True)[source]¶ Entry point to configure and begin network message polling.
Called by x84/engine.py, function main() as unmanaged thread.
Parameters: background_daemon (bool) – When True (default), this function returns and web modules are served in an unmanaged, background (daemon) thread. Otherwise, function call to main()
is blocking.Return type: None
-
x84.msgpoll.
poller
(poll_interval)[source]¶ Blocking function periodically polls configured message networks.
-
x84.msgpoll.
prepare_message
(msg, network, parent)[source]¶ turn a Msg object into a dict for transfer