% layout 'default', title => "Sme server 2 - fail2ban"; % content_for 'module' => begin
%if ($config->{debug} == 1) {

%= dumper $c->current_route %= dumper $f2b_datas

%} % if ( stash 'error' ) {
%= $c->render_to_string(inline => stash 'error')
%}

<%= $title %>

%= form_for '/fail2ban' => (method => 'POST') => begin

%=l('f2b_SERVICE_STATUS')
%=l 'f2b_STATUS' % param 'Status' => $f2b_datas->{status} unless param 'Status'; %= select_field 'Status' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'

%=l('f2b_FilterLocalNetworks_STATUS')
%=l 'f2b_FilterLocalNetworks' % param 'FilterLocalNetworks' => $f2b_datas->{filterlocalnetworks} unless param 'FilterLocalNetworks'; %= select_field 'FilterLocalNetworks' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'

%=l('f2b_FilterValidRemoteHosts_STATUS')
%=l 'f2b_FilterValidRemoteHosts' % param 'FilterValidRemoteHosts' => $f2b_datas->{filtervalidremotehosts} unless param 'FilterValidRemoteHosts'; %= select_field 'FilterValidRemoteHosts' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'

%=l('f2b_SEND_MAIL_STATUS')
%=l 'f2b_MAIL' % param 'Mail' => $f2b_datas->{mail} unless param 'Mail'; %= select_field 'Mail' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'

%=l 'f2b_DEFAULT_BANTIME' % param 'BanTime' => $f2b_datas->{bantime} unless param 'BanTime'; %= text_field 'BanTime', size => '9', class => 'input' %=l 'f2b_DEFAULT_FINDTIME' % param 'FindTime' => $f2b_datas->{findtime} unless param 'FindTime'; %= text_field 'FindTime', size => '6', class => 'input' %=l 'f2b_DEFAULT_MAXRETRY' % param 'MaxRetry' => $f2b_datas->{maxretry} unless param 'MaxRetry'; %= text_field 'MaxRetry', size => '2', class => 'input'

%=l('f2b_SSHD_STATUS')
%=l 'f2b_SSHD' % param 'Sshd' => $f2b_datas->{sshd} unless param 'Sshd'; %= select_field 'Sshd' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'

%=l('f2b_QPSMTPD_STATUS')
%=l 'f2b_QPSMTPD' % param 'Qpsmtpd' => $f2b_datas->{qpsmtpd} unless param 'Qpsmtpd'; %= select_field 'Qpsmtpd' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'

%=l('f2b_IMAP_STATUS')
%=l 'f2b_IMAP' % param 'Dovecot' => $f2b_datas->{dovecot} unless param 'Dovecot'; %= select_field 'Dovecot' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'

%=l('f2b_HTTPD_STATUS')
%=l 'f2b_HTTPD' % param 'Httpd-e-smith' => $f2b_datas->{'httpd-e-smith'} unless param 'Httpd-e-smith'; %= select_field 'Httpd-e-smith' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'

%=l('f2b_FTP_STATUS')
%=l 'f2b_FTP' % param 'Ftp' => $f2b_datas->{ftp} unless param 'Ftp'; %= select_field 'Ftp' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'

%=l('f2b_LEMONLDAP_STATUS')
%=l 'f2b_LEMONLDAP' % param 'Lemonldap' => $f2b_datas->{lemonldap} unless param 'Lemonldap'; %= select_field 'Lemonldap' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'

%=l('f2b_EJABBERD_STATUS')
%=l 'f2b_EJABBERD' % param 'Ejabberd' => $f2b_datas->{ejabberd} unless param 'Ejabberd'; %= select_field 'Ejabberd' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'

%=l('f2b_SOGOD_STATUS')
%=l 'f2b_SOGOD' % param 'Sogod' => $f2b_datas->{sogod} unless param 'Sogod'; %= select_field 'Sogod' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'

%=l('f2b_WORDPRESS_STATUS')
%=l 'f2b_WORDPRESS' % param 'Wordpress' => $f2b_datas->{wordpress} unless param 'Wordpress'; %= select_field 'Wordpress' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'

%=l('f2b_SMANAGER_STATUS')
%=l 'f2b_SMANAGER' % param 'Smanager' => $f2b_datas->{smanager} unless param 'Smanager'; %= select_field 'Smanager' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'

%= include 'partials/_f2b_valid'

%=l('f2b_DESC_ADD_IP')
%=l 'f2b_ADD_IP' % param 'Ip' => $f2b_datas->{ip} unless param 'Ip'; %= text_field 'Ip', class => 'input'

%=l('f2b_DESC_ADD_BITS')
%=l 'f2b_ADD_BITS' % param 'Bits' => $f2b_datas->{bits} unless param 'Bits'; %= text_field 'Bits', class => 'input'

%= submit_button $c->l('SAVE'), class => 'action'
% end %= include 'partials/_f2b_blocked'
%end