[#759] Add fail2ban to Plinth UI

Run sudo-required action via actions.superuser_run

Actions related to services those require `sudo` permissions need to
be executed via actions.superuser_run.

NOTE:
If plinth service is started via `sudo ./run --debug` (in dev mode)
all actions will be executed silently. But plinth in user machines
won't be executed with sudo permissions.
This commit is contained in:
nsaikiran authored and James Valleroy committed 2017-07-29 09:42:31 -04:00
1 parent 09f3f23e10
commit a8a5da996e
5 files changed
+42 -2

No files matched your search

+6
View File
@@ -31,3 +31,9 @@ class SecurityForm(forms.Form):
'group will be able to log in to console or via SSH. '
'Console users may be able to access some services '
'without further authorization.'))
fail2ban_enabled = forms.BooleanField(
label=_('Fail2ban (recommended)'), required=False,
help_text=_('When this option is enabled, fail2ban will limit brute force '
'break-in attempts to the SSH server and other password protected '
'internet-services which are enabled.'
))