From 52e223dd5f31ac64d0c64d7acf1f533d7d0bf1a5 Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Sat, 7 Sep 2024 19:51:06 +1000 Subject: [PATCH] initial commit of file from CVS for smeserver-denyhosts on Sat Sep 7 19:51:06 AEST 2024 --- .gitignore | 4 + Makefile | 21 ++ README.md | 17 +- contriborbase | 1 + createlinks | 35 ++ .../configuration/defaults/denyhosts/status | 1 + .../db/configuration/defaults/denyhosts/type | 1 + .../etc/e-smith/events/actions/denyhost-purge | 64 ++++ .../bg/etc/e-smith/web/functions/denyhosts | 58 ++++ .../da/etc/e-smith/web/functions/denyhosts | 58 ++++ .../de/etc/e-smith/web/functions/denyhosts | 58 ++++ .../el/etc/e-smith/web/functions/denyhosts | 58 ++++ .../en-us/etc/e-smith/web/functions/denyhosts | 66 ++++ .../es/etc/e-smith/web/functions/denyhosts | 58 ++++ .../et/etc/e-smith/web/functions/denyhosts | 58 ++++ .../fr/etc/e-smith/web/functions/denyhosts | 58 ++++ .../he/etc/e-smith/web/functions/denyhosts | 58 ++++ .../hu/etc/e-smith/web/functions/denyhosts | 58 ++++ .../id/etc/e-smith/web/functions/denyhosts | 58 ++++ .../it/etc/e-smith/web/functions/denyhosts | 58 ++++ .../ja/etc/e-smith/web/functions/denyhosts | 58 ++++ .../nb/etc/e-smith/web/functions/denyhosts | 58 ++++ .../nl/etc/e-smith/web/functions/denyhosts | 58 ++++ .../pl/etc/e-smith/web/functions/denyhosts | 58 ++++ .../pt-br/etc/e-smith/web/functions/denyhosts | 58 ++++ .../pt/etc/e-smith/web/functions/denyhosts | 58 ++++ .../ro/etc/e-smith/web/functions/denyhosts | 58 ++++ .../ru/etc/e-smith/web/functions/denyhosts | 58 ++++ .../sl/etc/e-smith/web/functions/denyhosts | 58 ++++ .../sv/etc/e-smith/web/functions/denyhosts | 58 ++++ .../th/etc/e-smith/web/functions/denyhosts | 58 ++++ .../tr/etc/e-smith/web/functions/denyhosts | 58 ++++ .../zh-cn/etc/e-smith/web/functions/denyhosts | 58 ++++ .../zh-tw/etc/e-smith/web/functions/denyhosts | 58 ++++ .../templates.metadata/etc/denyhosts.conf | 3 + .../templates/etc/denyhosts.conf/ADMIN_EMAIL | 5 + .../etc/denyhosts.conf/AGE_RESET_INVALID | 1 + .../etc/denyhosts.conf/AGE_RESET_RESTRICTED | 1 + .../etc/denyhosts.conf/AGE_RESET_ROOT | 1 + .../etc/denyhosts.conf/AGE_RESET_VALID | 1 + .../etc/denyhosts.conf/BLOCK_SERVICE | 1 + .../templates/etc/denyhosts.conf/DAEMON_LOG | 1 + .../templates/etc/denyhosts.conf/DAEMON_PURGE | 1 + .../templates/etc/denyhosts.conf/DAEMON_SLEEP | 1 + .../etc/denyhosts.conf/DENY_THRESHOLD_INVALID | 1 + .../denyhosts.conf/DENY_THRESHOLD_RESTRICTED | 1 + .../etc/denyhosts.conf/DENY_THRESHOLD_ROOT | 1 + .../etc/denyhosts.conf/DENY_THRESHOLD_VALID | 1 + .../etc/denyhosts.conf/FAILED_ENTRY_REGEX2 | 3 + .../etc/denyhosts.conf/FAILED_ENTRY_REGEX6 | 3 + .../etc/denyhosts.conf/FAILED_ENTRY_REGEX7 | 3 + .../etc/denyhosts.conf/HOSTNAME_LOOKUP | 1 + .../templates/etc/denyhosts.conf/HOSTS_DENY | 1 + .../templates/etc/denyhosts.conf/LOCK_FILE | 1 + .../templates/etc/denyhosts.conf/PURGE_DENY | 1 + .../etc/denyhosts.conf/RESET_ON_SUCCESS | 1 + .../templates/etc/denyhosts.conf/SECURE_LOG | 1 + .../templates/etc/denyhosts.conf/SMTP_FROM | 1 + .../templates/etc/denyhosts.conf/SMTP_HOST | 1 + .../templates/etc/denyhosts.conf/SMTP_PORT | 1 + .../templates/etc/denyhosts.conf/SMTP_SUBJECT | 1 + .../etc/denyhosts.conf/SSHD_FORMAT_REGEX | 1 + .../etc/denyhosts.conf/SUCCESSFUL_ENTRY_REGEX | 3 + .../SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS | 1 + .../etc/denyhosts.conf/SYSLOG_REPORT | 1 + .../templates/etc/denyhosts.conf/WORK_DIR | 1 + .../lib/denyhosts/allowed-hosts/db_entries | 4 + .../var/lib/denyhosts/allowed-hosts/localhost | 1 + root/etc/e-smith/web/functions/denyhosts | 44 +++ .../denyhosts.service.d/49-koozali.conf | 8 + .../esmith/FormMagick/Panel/denyhosts.pm | 305 ++++++++++++++++++ smeserver-denyhosts.spec | 107 ++++++ 72 files changed, 2173 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 contriborbase create mode 100755 createlinks create mode 100644 root/etc/e-smith/db/configuration/defaults/denyhosts/status create mode 100644 root/etc/e-smith/db/configuration/defaults/denyhosts/type create mode 100644 root/etc/e-smith/events/actions/denyhost-purge create mode 100644 root/etc/e-smith/locale/bg/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/da/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/de/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/el/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/es/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/et/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/fr/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/he/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/hu/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/id/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/it/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/ja/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/nb/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/nl/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/pl/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/pt-br/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/pt/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/ro/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/ru/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/sl/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/sv/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/th/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/tr/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/zh-cn/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/locale/zh-tw/etc/e-smith/web/functions/denyhosts create mode 100644 root/etc/e-smith/templates.metadata/etc/denyhosts.conf create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/ADMIN_EMAIL create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/AGE_RESET_INVALID create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/AGE_RESET_RESTRICTED create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/AGE_RESET_ROOT create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/AGE_RESET_VALID create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/BLOCK_SERVICE create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/DAEMON_LOG create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/DAEMON_PURGE create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/DAEMON_SLEEP create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/DENY_THRESHOLD_INVALID create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/DENY_THRESHOLD_RESTRICTED create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/DENY_THRESHOLD_ROOT create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/DENY_THRESHOLD_VALID create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/FAILED_ENTRY_REGEX2 create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/FAILED_ENTRY_REGEX6 create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/FAILED_ENTRY_REGEX7 create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/HOSTNAME_LOOKUP create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/HOSTS_DENY create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/LOCK_FILE create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/PURGE_DENY create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/RESET_ON_SUCCESS create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/SECURE_LOG create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/SMTP_FROM create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/SMTP_HOST create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/SMTP_PORT create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/SMTP_SUBJECT create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/SSHD_FORMAT_REGEX create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/SUCCESSFUL_ENTRY_REGEX create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/SYSLOG_REPORT create mode 100644 root/etc/e-smith/templates/etc/denyhosts.conf/WORK_DIR create mode 100644 root/etc/e-smith/templates/var/lib/denyhosts/allowed-hosts/db_entries create mode 100644 root/etc/e-smith/templates/var/lib/denyhosts/allowed-hosts/localhost create mode 100755 root/etc/e-smith/web/functions/denyhosts create mode 100644 root/usr/lib/systemd/system/denyhosts.service.d/49-koozali.conf create mode 100755 root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/denyhosts.pm create mode 100644 smeserver-denyhosts.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3aa8108 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.rpm +*.log +*spec-20* +*.tgz diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..43782b5 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: smeserver-denyhosts +# $Id: Makefile,v 1.1 2020/10/23 12:01:47 brianr Exp $ +NAME := smeserver-denyhosts +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/README.md b/README.md index 8698fed..1b052e6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,16 @@ -# smeserver-denyhosts +# smeserver-denyhosts -SMEServer Koozali developed git repo for smeserver-denyhosts smecontribs \ No newline at end of file +SMEServer Koozali developed git repo for smeserver-denyhosts smecontribs + +## Wiki +
https://wiki.koozali.org/Denyhosts +
https://wiki.koozali.org/Denyhosts/fr + +## Bugzilla +Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=smeserver-denyhosts&product=SME%20Contribs&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED) + +## Description + +
*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.* +*Once it has been checked, then this comment will be deleted* +
diff --git a/contriborbase b/contriborbase new file mode 100644 index 0000000..9b7fd51 --- /dev/null +++ b/contriborbase @@ -0,0 +1 @@ +contribs10 diff --git a/createlinks b/createlinks new file mode 100755 index 0000000..50de51c --- /dev/null +++ b/createlinks @@ -0,0 +1,35 @@ +#!/usr/bin/perl -w + +use esmith::Build::CreateLinks qw(:all); + +panel_link("denyhosts", "manager"); + +safe_symlink('restart', "root/etc/e-smith/events/conf-denyhosts/services2adjust/denyhosts"); + +foreach $file ( + qw(/var/lib/denyhosts/allowed-hosts /etc/denyhosts.conf)) +{ + templates2events($file, qw(bootstrap-console-save conf-denyhosts smeserver-denyhosts-update)); +} + +foreach $file ( + qw(/etc/hosts.allow)) +{ + templates2events($file, qw(conf-denyhosts smeserver-denyhosts-update)); +} + + +my $event= "smeserver-denyhosts-update"; +event_link("systemd-reload", $event, "89"); +event_link("systemd-default", $event, "88"); +safe_symlink('restart', "root/etc/e-smith/events/$event/services2adjust/denyhosts"); +event_link("navigation-conf", $event, "80"); + +use esmith::Build::Backup qw(:all); +backup_includes("smeserver-denyhosts", qw( +/var/lib/denyhosts/ +/etc/hosts.deny_ssh +/etc/hosts.deny_ssh.purge.bak +)); + +exit 0; diff --git a/root/etc/e-smith/db/configuration/defaults/denyhosts/status b/root/etc/e-smith/db/configuration/defaults/denyhosts/status new file mode 100644 index 0000000..7a68b11 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/denyhosts/status @@ -0,0 +1 @@ +disabled diff --git a/root/etc/e-smith/db/configuration/defaults/denyhosts/type b/root/etc/e-smith/db/configuration/defaults/denyhosts/type new file mode 100644 index 0000000..24e1098 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/denyhosts/type @@ -0,0 +1 @@ +service diff --git a/root/etc/e-smith/events/actions/denyhost-purge b/root/etc/e-smith/events/actions/denyhost-purge new file mode 100644 index 0000000..8c4201c --- /dev/null +++ b/root/etc/e-smith/events/actions/denyhost-purge @@ -0,0 +1,64 @@ +#!/usr/bin/perl -w + +use strict; +use Errno; +use esmith::ConfigDB; +use esmith::util; +use esmith::db; +use Data::Validate::IP; +my $validator=Data::Validate::IP->new; + +my $event = $ARGV [0]; +my $ip = $ARGV [1]; +my $whitelist = $ARGV [2]; +my $debug=0; + +die "IP missing" unless defined ($ip); +die "Not an IP" unless ($validator->is_ipv4($ip)); + + +die "IP $ip not banned" unless (system("grep $ip /etc/hosts.deny_ssh ".'>/dev/null 2>&1') == 0); +die "can not stop denyhost" unless ( system("/etc/init.d/denyhosts","stop") ==0); + +# unlist +my @files = ('/etc/hosts.deny_ssh', '/var/lib/denyhosts/hosts', '/var/lib/denyhosts/hosts-restricted' , '/var/lib/denyhosts/hosts-root', '/var/lib/denyhosts/hosts-valid', '/var/lib/denyhosts/users-hosts' ); +foreach my $file (@files) { + + if (system("grep $ip $file".' >/dev/null 2>&1') == 0) { + print "$ip removed from $file\n" if (system("sed -i '/$ip/d' $file") == 0 && $debug ) + } +} + +#(optional, whitelist) /var/lib/denyhosts/allowed-hosts +if (defined($whitelist)) { + # add to db + my $db = esmith::ConfigDB->open + || warn "Couldn't open configuration database (permissions problems?)"; + + my $rec = $db->get('denyhosts'); + if ($rec) + { + + my $prop = $rec->prop('ValidFrom') || ''; + + my @vals = split /,/, $prop; + unless (grep /^$ip$/, @vals) + { # already have this entry + if ($prop ne '') + { + $prop .= ",$ip"; + } + else + { + $prop = "$ip"; + } + $rec->set_prop('ValidFrom', $prop); + + system("/sbin/e-smith/expand-template /var/lib/denyhosts/allowed-hosts"); + print "Add to whitelist: $ip \n"; + } + } +} +# /etc/init.d/denyhosts start +system("/etc/init.d/denyhosts","start"); + diff --git a/root/etc/e-smith/locale/bg/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/bg/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..2333b3e --- /dev/null +++ b/root/etc/e-smith/locale/bg/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Състояние на услугата denyhosts + + + STATUS + Състояние + + + VALIDFROM_DESC +

Разрешени хостове

Това е списък на хостовете, които няма да бъдат блокирани от denyhosts.

]]>
+
+ + NO_ENTRIES_YET + Няма елементи + + + DESC_ADD_IP + За да добавите нов разрешен хост въведете информацията по-долу. + + + ADD_IP + Оторизиран IP + + + CURRENT_DENY_DESC + Blocked Hosts

Това е списък на хостовете които са блокирани в момента и кога са видени за пръв път. ]]> + + + FIRST_SEEN + Хостът видян за пръв път + + + SUCCESS + Новите настройки на denyhosts бяха записани. + + + ERR_NO_RECORD + Не успяхме да намерим запис за denyhosts в базата данни за конфигурации + + + ERROR_STOPPING + Грешка при опит за спиране на услугата + + + SUCCESS_IP + Беше махната забраната за този IP адрес + + + SUCCESS_IP_WHITE + Беше махната забраната за този IP адрес и бе поставен бели списък + + + WHITELIST + Бял списък + + diff --git a/root/etc/e-smith/locale/da/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/da/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..2c8e18b --- /dev/null +++ b/root/etc/e-smith/locale/da/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Blokerede værters servicestatus + + + STATUS + Status + + + VALIDFROM_DESC +

Tilladte Værter

Dette er en liste over værter der ikke vil blive blokeret af denyhost.

]]>
+
+ + NO_ENTRIES_YET + Ingen optegnelser + + + DESC_ADD_IP + For at tilføje en ny tilladt vært, angiv detaljer nedenfor. + + + ADD_IP + Autoriseret IP + + + CURRENT_DENY_DESC + Blokerede Værter

Dette er en liste over aktuelt blokerede værter og hvornår de først er set. ]]> + + + FIRST_SEEN + Vært set første gang + + + SUCCESS + De nye indstillinger for blokerede væreter er gemt. + + + ERR_NO_RECORD + Er ikke i stand til at lokalisere optegnelser over blokerede værter i konfigurationdatabasen + + + ERROR_STOPPING + Fejl under forsøg på at stoppe denne service + + + SUCCESS_IP + Det følgende IP er ikke længere blokeret + + + SUCCESS_IP_WHITE + Det følgende IP er ikke længere blokeret og er hvidlistet + + + WHITELIST + Hvidliste + + diff --git a/root/etc/e-smith/locale/de/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/de/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..d1d67ba --- /dev/null +++ b/root/etc/e-smith/locale/de/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Status des Dienstes denyhosts + + + STATUS + Status + + + VALIDFROM_DESC +

Allowed Hosts

This is a list of hosts that will not be blocked by denyhosts.

]]>
+
+ + NO_ENTRIES_YET + Noch keine Einträge + + + DESC_ADD_IP + Um einen neuen zugelassenen Rechner für den Fernzugriff hinzuzufügen, geben Sie die erforderlichen Daten unten ein. + + + ADD_IP + Berechtigte IPv4 Adresse hinzufügen + + + CURRENT_DENY_DESC + Blocked Hosts

This is a list of hosts that are currently blocked and when they were first seen. ]]> + + + FIRST_SEEN + Host zuerst bemerkt am + + + SUCCESS + Die neuen Einstellungen für den Dienst denyhosts wurden gespeichert. + + + ERR_NO_RECORD + In der Konfigurationsdatenbank kann kein "denyhost" Eintrag gefunden werden. + + + ERROR_STOPPING + Fehler beim Versuch den service zu stoppen. + + + SUCCESS_IP + Der Client wurde getrennt + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + Whitelisten + + diff --git a/root/etc/e-smith/locale/el/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/el/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..795a34c --- /dev/null +++ b/root/etc/e-smith/locale/el/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Denyhosts service status + + + STATUS + Status + + + VALIDFROM_DESC +

Allowed Hosts

This is a list of hosts that will not be blocked by denyhosts.

]]>
+
+ + NO_ENTRIES_YET + No Entries Yet + + + DESC_ADD_IP + To add a new allowed host, enter the details below. + + + ADD_IP + Authorized IP + + + CURRENT_DENY_DESC + Blocked Hosts

This is a list of hosts that are currently blocked and when they were first seen. ]]> + + + FIRST_SEEN + Host first seen + + + SUCCESS + The new denyhosts settings have been saved. + + + ERR_NO_RECORD + Unable to locate denyhosts record in configuration db + + + ERROR_STOPPING + Error while trying to stop service + + + SUCCESS_IP + The following IP has been unbanned + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + Whitelist + + diff --git a/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..02b55c0 --- /dev/null +++ b/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,66 @@ + + + SERVICE_STATUS + Denyhosts service status + + + STATUS + Status + + + VALIDFROM_DESC + +

Allowed Hosts

+

This is a list of hosts that will not be blocked by denyhosts.

+ ]]> +
+
+ + NO_ENTRIES_YET + No Entries Yet + + + DESC_ADD_IP + To add a new allowed host, enter the details below. + + + ADD_IP + Authorized IP + + + CURRENT_DENY_DESC + + Blocked Hosts +

This is a list of hosts that are currently blocked and when they were first seen. + ]]> + + + + FIRST_SEEN + Host first seen + + + SUCCESS + The new denyhosts settings have been saved. + + + ERR_NO_RECORD + Unable to locate denyhosts record in configuration db + + + ERROR_STOPPING + Error while trying to stop service + + + SUCCESS_IP + The following IP has been unbanned + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + Whitelist + + diff --git a/root/etc/e-smith/locale/es/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/es/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..56c24bc --- /dev/null +++ b/root/etc/e-smith/locale/es/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Estado del servicio Denyhosts + + + STATUS + Estado + + + VALIDFROM_DESC +

Allowed Hosts

This is a list of hosts that will not be blocked by denyhosts.

]]>
+
+ + NO_ENTRIES_YET + Aún No Hay Entradas + + + DESC_ADD_IP + Para permitir un nuevo host, introduzca los detalles a continuación. + + + ADD_IP + IP autorizada + + + CURRENT_DENY_DESC + Blocked Hosts

This is a list of hosts that are currently blocked and when they were first seen. ]]> + + + FIRST_SEEN + Host visto por primera vez + + + SUCCESS + La nueva configuración de denyhosts ha sido guardada. + + + ERR_NO_RECORD + No se puede ubicar el registro denyhosts en la base de datos de configuración + + + ERROR_STOPPING + Ocurrió un error mientras se detenía el servicio + + + SUCCESS_IP + The following IP has been unbanned + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + Estado Whitelists + + diff --git a/root/etc/e-smith/locale/et/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/et/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..d509aaa --- /dev/null +++ b/root/etc/e-smith/locale/et/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Denyhosts teenuse olek + + + STATUS + Olek + + + VALIDFROM_DESC +

Allowed Hosts

This is a list of hosts that will not be blocked by denyhosts.

]]>
+
+ + NO_ENTRIES_YET + Pole veel sisestusi + + + DESC_ADD_IP + Uue hosti lubamiseks sisesta allpool andmed. + + + ADD_IP + Autoriseeritud IP + + + CURRENT_DENY_DESC + Blocked Hosts

This is a list of hosts that are currently blocked and when they were first seen. ]]> + + + FIRST_SEEN + Host first seen + + + SUCCESS + Uued denyhosts seaded edukalt salvestatud. + + + ERR_NO_RECORD + Ei leia denyhosts kirjeid gonfiguratsiooni andmebaasist + + + ERROR_STOPPING + Teenuse peatamisel ilmnes viga + + + SUCCESS_IP + The following IP has been unbanned + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + Valge nimekirja olek + + diff --git a/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..079ea85 --- /dev/null +++ b/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + État du service Denyhosts + + + STATUS + État + + + VALIDFROM_DESC +

Hôtes Autorisés

Ceci est une liste d'hôtes qui ne seront pas interdits via denyhosts. ]]> + + + NO_ENTRIES_YET + Aucune entrée + + + DESC_ADD_IP + Pour ajouter un nouvel Hôte autorisé, entrez les informations ci-dessous : + + + ADD_IP + IPv4 autorisée + + + CURRENT_DENY_DESC + Liste des hôtes bloqués

Voici la liste des hôtes qui ont été bannis par denyhosts, ainsi que la date de leur ajout par denyhosts. ]]> + + + FIRST_SEEN + Hôte vu pour la première fois + + + SUCCESS + Les nouveaux paramètres de denyhosts ont été enregistrés. + + + ERR_NO_RECORD + Impossible de trouver les informations dans la base de données de configuration. + + + ERROR_STOPPING + Une erreur s'est produite pendant l'arrêt du service + + + SUCCESS_IP + L'IP a été dé-bannie + + + SUCCESS_IP_WHITE + L'IP a été dé-bannie et mise sur liste blanche + + + WHITELIST + Liste blanche + + diff --git a/root/etc/e-smith/locale/he/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/he/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..60bf685 --- /dev/null +++ b/root/etc/e-smith/locale/he/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Denyhosts service status + + + STATUS + מצב + + + VALIDFROM_DESC +

Allowed Hosts

This is a list of hosts that will not be blocked by denyhosts.

]]>
+
+ + NO_ENTRIES_YET + No Entries Yet + + + DESC_ADD_IP + To add a new allowed host, enter the details below. + + + ADD_IP + Authorized IP + + + CURRENT_DENY_DESC + Blocked Hosts

This is a list of hosts that are currently blocked and when they were first seen. ]]> + + + FIRST_SEEN + Host first seen + + + SUCCESS + The new denyhosts settings have been saved. + + + ERR_NO_RECORD + Unable to locate denyhosts record in configuration db + + + ERROR_STOPPING + Error while trying to stop service + + + SUCCESS_IP + The following IP has been unbanned + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + Whitelist + + diff --git a/root/etc/e-smith/locale/hu/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/hu/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..e71f5c3 --- /dev/null +++ b/root/etc/e-smith/locale/hu/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Denyhosts service status + + + STATUS + Állapot + + + VALIDFROM_DESC +

Allowed Hosts

This is a list of hosts that will not be blocked by denyhosts.

]]>
+
+ + NO_ENTRIES_YET + No Entries Yet + + + DESC_ADD_IP + To add a new allowed host, enter the details below. + + + ADD_IP + Authorized IP + + + CURRENT_DENY_DESC + Blocked Hosts

This is a list of hosts that are currently blocked and when they were first seen. ]]> + + + FIRST_SEEN + Host first seen + + + SUCCESS + The new denyhosts settings have been saved. + + + ERR_NO_RECORD + Unable to locate denyhosts record in configuration db + + + ERROR_STOPPING + Error while trying to stop service + + + SUCCESS_IP + The following IP has been unbanned + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + Whitelist + + diff --git a/root/etc/e-smith/locale/id/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/id/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..0fa3e58 --- /dev/null +++ b/root/etc/e-smith/locale/id/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Denyhosts service status + + + STATUS + Status + + + VALIDFROM_DESC +

Allowed Hosts

This is a list of hosts that will not be blocked by denyhosts.

]]>
+
+ + NO_ENTRIES_YET + No Entries Yet + + + DESC_ADD_IP + To add a new allowed host, enter the details below. + + + ADD_IP + Authorized IP + + + CURRENT_DENY_DESC + Blocked Hosts

This is a list of hosts that are currently blocked and when they were first seen. ]]> + + + FIRST_SEEN + Host first seen + + + SUCCESS + The new denyhosts settings have been saved. + + + ERR_NO_RECORD + Unable to locate denyhosts record in configuration db + + + ERROR_STOPPING + Error while trying to stop service + + + SUCCESS_IP + The following IP has been unbanned + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + Whitelist + + diff --git a/root/etc/e-smith/locale/it/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/it/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..fbd4730 --- /dev/null +++ b/root/etc/e-smith/locale/it/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Stato del servizio Denyhosts + + + STATUS + Stato + + + VALIDFROM_DESC +

Host accettati

Questa è la lista di host che non saranno bloccati da denyhosts.

]]>
+
+ + NO_ENTRIES_YET + Nessun elemento inserito + + + DESC_ADD_IP + Per aggiungere un nuovo host, inserire i dettagli sotto. + + + ADD_IP + Indirizzi IP autorizzati + + + CURRENT_DENY_DESC + Host bloccati

Questa è la lista degli host attualmente bloccati e da quando. ]]> + + + FIRST_SEEN + Data del blocco + + + SUCCESS + La nuova configurazione è stata salvata. + + + ERR_NO_RECORD + Impossibile trovare il record per Denyhosts nel db di configurazione + + + ERROR_STOPPING + Errore durante l'arresto del servizio + + + SUCCESS_IP + L'indirizzo IP è stato rimosso dalla ban-list + + + SUCCESS_IP_WHITE + L'indirizzo IP è stato rimosso dalla ban-list ed inserito in white-list + + + WHITELIST + White List + + diff --git a/root/etc/e-smith/locale/ja/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/ja/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..2355ea4 --- /dev/null +++ b/root/etc/e-smith/locale/ja/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Denyhosts service status + + + STATUS + 状態 + + + VALIDFROM_DESC +

Allowed Hosts

This is a list of hosts that will not be blocked by denyhosts.

]]>
+
+ + NO_ENTRIES_YET + No Entries Yet + + + DESC_ADD_IP + To add a new allowed host, enter the details below. + + + ADD_IP + Authorized IP + + + CURRENT_DENY_DESC + Blocked Hosts

This is a list of hosts that are currently blocked and when they were first seen. ]]> + + + FIRST_SEEN + Host first seen + + + SUCCESS + The new denyhosts settings have been saved. + + + ERR_NO_RECORD + Unable to locate denyhosts record in configuration db + + + ERROR_STOPPING + Error while trying to stop service + + + SUCCESS_IP + 設定が保存されました。 + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + Whitelist + + diff --git a/root/etc/e-smith/locale/nb/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/nb/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..56287e9 --- /dev/null +++ b/root/etc/e-smith/locale/nb/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Denyhosts service status + + + STATUS + Status + + + VALIDFROM_DESC +

Allowed Hosts

This is a list of hosts that will not be blocked by denyhosts.

]]>
+
+ + NO_ENTRIES_YET + No Entries Yet + + + DESC_ADD_IP + To add a new allowed host, enter the details below. + + + ADD_IP + Authorized IP + + + CURRENT_DENY_DESC + Blocked Hosts

This is a list of hosts that are currently blocked and when they were first seen. ]]> + + + FIRST_SEEN + Host first seen + + + SUCCESS + The new denyhosts settings have been saved. + + + ERR_NO_RECORD + Unable to locate denyhosts record in configuration db + + + ERROR_STOPPING + Error while trying to stop service + + + SUCCESS_IP + The following IP has been unbanned + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + Whitelist + + diff --git a/root/etc/e-smith/locale/nl/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/nl/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..0f81852 --- /dev/null +++ b/root/etc/e-smith/locale/nl/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Denyhosts dienst status + + + STATUS + Status + + + VALIDFROM_DESC +

Allowed Hosts

This is a list of hosts that will not be blocked by denyhosts.

]]>
+
+ + NO_ENTRIES_YET + Nog geen gegevens + + + DESC_ADD_IP + Voer hieronder de details in voor een nieuwe toegestane host. + + + ADD_IP + Geautoriseerd IP + + + CURRENT_DENY_DESC + Blocked Hosts

This is a list of hosts that are currently blocked and when they were first seen. ]]> + + + FIRST_SEEN + Host voor het eerst gezien + + + SUCCESS + De nieuwe denyhosts instellingen zijn opgeslagen. + + + ERR_NO_RECORD + Kan het denyhost record niet vinden in de configuratie database + + + ERROR_STOPPING + Fout opgetreden bij proberen dienst te stoppen + + + SUCCESS_IP + De verbinding met het systeem is verbroken + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + Witte lijst + + diff --git a/root/etc/e-smith/locale/pl/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/pl/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..8a43571 --- /dev/null +++ b/root/etc/e-smith/locale/pl/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Denyhosts service status + + + STATUS + Stan + + + VALIDFROM_DESC +

Allowed Hosts

This is a list of hosts that will not be blocked by denyhosts.

]]>
+
+ + NO_ENTRIES_YET + No Entries Yet + + + DESC_ADD_IP + To add a new allowed host, enter the details below. + + + ADD_IP + Authorized IP + + + CURRENT_DENY_DESC + Blocked Hosts

This is a list of hosts that are currently blocked and when they were first seen. ]]> + + + FIRST_SEEN + Host first seen + + + SUCCESS + The new denyhosts settings have been saved. + + + ERR_NO_RECORD + Unable to locate denyhosts record in configuration db + + + ERROR_STOPPING + Error while trying to stop service + + + SUCCESS_IP + Ustawienia zostały zapisane. + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + Whitelist + + diff --git a/root/etc/e-smith/locale/pt-br/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/pt-br/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..bddea6d --- /dev/null +++ b/root/etc/e-smith/locale/pt-br/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Status do serviço denyhosts + + + STATUS + Status + + + VALIDFROM_DESC +

Hosts Permitidos

Esta é uma lista dos hosts que não serão bloqueados pelo denyhosts.

]]>
+
+ + NO_ENTRIES_YET + Nenhuma entrada ainda + + + DESC_ADD_IP + Para adicionar um novo host permitido entre com os detalhes abaixo. + + + ADD_IP + IP autorizado + + + CURRENT_DENY_DESC + Hosts Bloqueados

Esta é uma lista dos hosts que estão atualmente bloqueados e quando eles foram vistos primeiro. ]]> + + + FIRST_SEEN + Host visto primeiro em + + + SUCCESS + As novas configurações do denyhosts foram salvas. + + + ERR_NO_RECORD + Incapaz de localizar registro denyhosts na configuração do banco de dados + + + ERROR_STOPPING + Erro enquanto tentando parar serviço + + + SUCCESS_IP + O seguinte IP deixou de ser banido + + + SUCCESS_IP_WHITE + O seguinte IP deixou de ser banido e foi colocado na lista branca + + + WHITELIST + Lista Branca + + diff --git a/root/etc/e-smith/locale/pt/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/pt/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..dedcc23 --- /dev/null +++ b/root/etc/e-smith/locale/pt/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Status do serviço denyhosts + + + STATUS + Status + + + VALIDFROM_DESC +

Allowed Hosts

This is a list of hosts that will not be blocked by denyhosts.

]]>
+
+ + NO_ENTRIES_YET + Nenhuma entrada ainda + + + DESC_ADD_IP + Para adicionar um novo host permitido entre com os detalhes abaixo. + + + ADD_IP + IP autorizado + + + CURRENT_DENY_DESC + Blocked Hosts

This is a list of hosts that are currently blocked and when they were first seen. ]]> + + + FIRST_SEEN + Host visto primeiro em + + + SUCCESS + As novas configurações do denyhosts foram salvas. + + + ERR_NO_RECORD + Incapaz de localizar registro denyhosts na configuração do banco de dados + + + ERROR_STOPPING + Erro enquanto tentando parar serviço + + + SUCCESS_IP + The following IP has been unbanned + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + Whitelist + + diff --git a/root/etc/e-smith/locale/ro/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/ro/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..86803a3 --- /dev/null +++ b/root/etc/e-smith/locale/ro/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Starea serviciului Denyhosts + + + STATUS + Stare + + + VALIDFROM_DESC +

Clienti acceptați

Lista clienților ce nu vor fi blocați de "denyhosts".

]]>
+
+ + NO_ENTRIES_YET + Nu există nici o înregistrare + + + DESC_ADD_IP + Pentru a adauga un client nou, introduceți datele aici. + + + ADD_IP + IP-uri autorizate + + + CURRENT_DENY_DESC + Clienti blocați

Aceasta este lista clienților blocați și data când au apărut prima data. ]]> + + + FIRST_SEEN + Client observat prima data + + + SUCCESS + Noile setări ale serviciului denyhosts au fost salvate + + + ERR_NO_RECORD + Nu am putut localiza înregistrările serviciului denyhosts în baza de date de configurare + + + ERROR_STOPPING + A apărut o eroare când s-a încercat oprirea serviciului + + + SUCCESS_IP + The following IP has been unbanned + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + Whitelist + + diff --git a/root/etc/e-smith/locale/ru/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/ru/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..642a7a4 --- /dev/null +++ b/root/etc/e-smith/locale/ru/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Состояние службы denyhosts + + + STATUS + Состояние + + + VALIDFROM_DESC +

Разрешенные хосты

Это список узлов не блокируемых denyhosts.

]]>
+
+ + NO_ENTRIES_YET + Нет элементов + + + DESC_ADD_IP + Чтобы добавить новый разрешенный хост введите подробности ниже. + + + ADD_IP + Авторизованный IP + + + CURRENT_DENY_DESC + Блокируемые хосты

Это список хостов, которые в настоящее время блокированы и время, когда они были впервые обнаружены. ]]> + + + FIRST_SEEN + Хост впервые обнаружен + + + SUCCESS + Новые настройки denyhosts были сохранены. + + + ERR_NO_RECORD + Неудалось обнаружить запись denyhosts в бд конфигурации + + + ERROR_STOPPING + Ошибка при попытке остановить службу + + + SUCCESS_IP + Клиент был отключен + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + Состояние whitelists + + diff --git a/root/etc/e-smith/locale/sl/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/sl/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..dccb376 --- /dev/null +++ b/root/etc/e-smith/locale/sl/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Denyhosts service status + + + STATUS + Status + + + VALIDFROM_DESC +

Allowed Hosts

This is a list of hosts that will not be blocked by denyhosts.

]]>
+
+ + NO_ENTRIES_YET + No Entries Yet + + + DESC_ADD_IP + To add a new allowed host, enter the details below. + + + ADD_IP + Authorized IP + + + CURRENT_DENY_DESC + Blocked Hosts

This is a list of hosts that are currently blocked and when they were first seen. ]]> + + + FIRST_SEEN + Host first seen + + + SUCCESS + The new denyhosts settings have been saved. + + + ERR_NO_RECORD + Unable to locate denyhosts record in configuration db + + + ERROR_STOPPING + Error while trying to stop service + + + SUCCESS_IP + The following IP has been unbanned + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + Whitelist + + diff --git a/root/etc/e-smith/locale/sv/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/sv/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..b1fd232 --- /dev/null +++ b/root/etc/e-smith/locale/sv/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Status på servicen Denyhosts + + + STATUS + Status + + + VALIDFROM_DESC +

Allowed Hosts

This is a list of hosts that will not be blocked by denyhosts.

]]>
+
+ + NO_ENTRIES_YET + Inga värden ännu + + + DESC_ADD_IP + För att lägga till en ny tillåten värd, ange värden nedan. + + + ADD_IP + Godkänd IP + + + CURRENT_DENY_DESC + Blocked Hosts

This is a list of hosts that are currently blocked and when they were first seen. ]]> + + + FIRST_SEEN + Värd sett första gången + + + SUCCESS + De nya inställningarna har sparats. + + + ERR_NO_RECORD + Kan inte hitta denyhosts-posten i konfigurationsdatabasen + + + ERROR_STOPPING + Ett fel uppstod vid försök att stoppa service + + + SUCCESS_IP + Klienten har blivit frånkopplad + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + Vitlistans status + + diff --git a/root/etc/e-smith/locale/th/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/th/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..cebe780 --- /dev/null +++ b/root/etc/e-smith/locale/th/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Denyhosts service status + + + STATUS + สถานะ + + + VALIDFROM_DESC +

Allowed Hosts

This is a list of hosts that will not be blocked by denyhosts.

]]>
+
+ + NO_ENTRIES_YET + No Entries Yet + + + DESC_ADD_IP + To add a new allowed host, enter the details below. + + + ADD_IP + Authorized IP + + + CURRENT_DENY_DESC + Blocked Hosts

This is a list of hosts that are currently blocked and when they were first seen. ]]> + + + FIRST_SEEN + Host first seen + + + SUCCESS + The new denyhosts settings have been saved. + + + ERR_NO_RECORD + Unable to locate denyhosts record in configuration db + + + ERROR_STOPPING + Error while trying to stop service + + + SUCCESS_IP + The following IP has been unbanned + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + Whitelist + + diff --git a/root/etc/e-smith/locale/tr/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/tr/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..61906bb --- /dev/null +++ b/root/etc/e-smith/locale/tr/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Sunucu engelleme servisinin durumu + + + STATUS + Durum + + + VALIDFROM_DESC +

Allowed Hosts

This is a list of hosts that will not be blocked by denyhosts.

]]>
+
+ + NO_ENTRIES_YET + Giriş izni yok + + + DESC_ADD_IP + Yeni güvenilir sunucu eklemek için, gerekli bilgileri aşağıya tanımlayın. + + + ADD_IP + Yetkilendirilmiş IP + + + CURRENT_DENY_DESC + Blocked Hosts

This is a list of hosts that are currently blocked and when they were first seen. ]]> + + + FIRST_SEEN + Sunucunu ilk defa görülmesi + + + SUCCESS + Yeni Engellenen Sunucu ayarları kaydedildi. + + + ERR_NO_RECORD + Veritabanında Engellenen Sunucu kaydı bulunamadı + + + ERROR_STOPPING + Servisi durdurmaya çalışırken hata oluştu + + + SUCCESS_IP + The following IP has been unbanned + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + liste + + diff --git a/root/etc/e-smith/locale/zh-cn/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/zh-cn/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..641c1d8 --- /dev/null +++ b/root/etc/e-smith/locale/zh-cn/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + Denyhosts 服务状态 + + + STATUS + 状态 + + + VALIDFROM_DESC +

Allowed Hosts

以下列表中的主机不会被阻止访问服务器。

]]>
+
+ + NO_ENTRIES_YET + 还没有输入 + + + DESC_ADD_IP + 要添加新的白名单主机,请在下面输入详情。 + + + ADD_IP + 信任的IP + + + CURRENT_DENY_DESC + Blocked Hosts

这是当前被拒绝的未知且未取得信任的主机列表。 ]]> + + + FIRST_SEEN + 第一次出现的主机 + + + SUCCESS + 新的 denyhosts 设置已被保存。 + + + ERR_NO_RECORD + 未能在本地配置数据库中找到 denyhosts 记录 + + + ERROR_STOPPING + 停止服务时出错 + + + SUCCESS_IP + 客户端已被断开 + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + 白名单状态 + + diff --git a/root/etc/e-smith/locale/zh-tw/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/locale/zh-tw/etc/e-smith/web/functions/denyhosts new file mode 100644 index 0000000..ac09458 --- /dev/null +++ b/root/etc/e-smith/locale/zh-tw/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,58 @@ + + + SERVICE_STATUS + 阻擋主機之服務的狀態 + + + STATUS + 狀態 + + + VALIDFROM_DESC +

主機白名單

以下列表中的主機將不會被主機黑名單所攔截。

]]>
+
+ + NO_ENTRIES_YET + 尚無輸入 + + + DESC_ADD_IP + 請於下方詳填欲新增主機的白名單。 + + + ADD_IP + 獲得授權的IP + + + CURRENT_DENY_DESC + 主機黑名單

此為初次訪問並於當下被拒絕的主機列表。]]> + + + FIRST_SEEN + 首次訪問的主機 + + + SUCCESS + 新的主機黑名單之設定已經被保存。 + + + ERR_NO_RECORD + 無法在設定資料庫中取得主機黑名單的紀錄 + + + ERROR_STOPPING + 錯誤發生於試圖停止服務時 + + + SUCCESS_IP + 此終端機已中斷 + + + SUCCESS_IP_WHITE + The following IP has been unbanned and whitelisted + + + WHITELIST + 白名單 + + diff --git a/root/etc/e-smith/templates.metadata/etc/denyhosts.conf b/root/etc/e-smith/templates.metadata/etc/denyhosts.conf new file mode 100644 index 0000000..19c11e8 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/etc/denyhosts.conf @@ -0,0 +1,3 @@ +PERMS=0600 +UID="root" +GID="root" diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/ADMIN_EMAIL b/root/etc/e-smith/templates/etc/denyhosts.conf/ADMIN_EMAIL new file mode 100644 index 0000000..3056d25 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/ADMIN_EMAIL @@ -0,0 +1,5 @@ +{ + my $ADMIN_EMAIL = ( $denyhosts{'AdminEmail'} || 'admin@localhost'); + $OUT="ADMIN_EMAIL = $ADMIN_EMAIL "; + +} diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/AGE_RESET_INVALID b/root/etc/e-smith/templates/etc/denyhosts.conf/AGE_RESET_INVALID new file mode 100644 index 0000000..1c9a601 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/AGE_RESET_INVALID @@ -0,0 +1 @@ +AGE_RESET_INVALID=10d diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/AGE_RESET_RESTRICTED b/root/etc/e-smith/templates/etc/denyhosts.conf/AGE_RESET_RESTRICTED new file mode 100644 index 0000000..1a8e507 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/AGE_RESET_RESTRICTED @@ -0,0 +1 @@ +AGE_RESET_RESTRICTED=25d diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/AGE_RESET_ROOT b/root/etc/e-smith/templates/etc/denyhosts.conf/AGE_RESET_ROOT new file mode 100644 index 0000000..adf1eb2 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/AGE_RESET_ROOT @@ -0,0 +1 @@ +AGE_RESET_ROOT=25d diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/AGE_RESET_VALID b/root/etc/e-smith/templates/etc/denyhosts.conf/AGE_RESET_VALID new file mode 100644 index 0000000..88c1d04 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/AGE_RESET_VALID @@ -0,0 +1 @@ +AGE_RESET_VALID=5d diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/BLOCK_SERVICE b/root/etc/e-smith/templates/etc/denyhosts.conf/BLOCK_SERVICE new file mode 100644 index 0000000..656f8d2 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/BLOCK_SERVICE @@ -0,0 +1 @@ +BLOCK_SERVICE = diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/DAEMON_LOG b/root/etc/e-smith/templates/etc/denyhosts.conf/DAEMON_LOG new file mode 100644 index 0000000..24d6ba0 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/DAEMON_LOG @@ -0,0 +1 @@ +DAEMON_LOG = /var/log/denyhosts diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/DAEMON_PURGE b/root/etc/e-smith/templates/etc/denyhosts.conf/DAEMON_PURGE new file mode 100644 index 0000000..8723e3f --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/DAEMON_PURGE @@ -0,0 +1 @@ +DAEMON_PURGE = 1h diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/DAEMON_SLEEP b/root/etc/e-smith/templates/etc/denyhosts.conf/DAEMON_SLEEP new file mode 100644 index 0000000..84ea665 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/DAEMON_SLEEP @@ -0,0 +1 @@ +DAEMON_SLEEP = 30s diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/DENY_THRESHOLD_INVALID b/root/etc/e-smith/templates/etc/denyhosts.conf/DENY_THRESHOLD_INVALID new file mode 100644 index 0000000..4a16535 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/DENY_THRESHOLD_INVALID @@ -0,0 +1 @@ +DENY_THRESHOLD_INVALID = 2 diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/DENY_THRESHOLD_RESTRICTED b/root/etc/e-smith/templates/etc/denyhosts.conf/DENY_THRESHOLD_RESTRICTED new file mode 100644 index 0000000..76f66b1 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/DENY_THRESHOLD_RESTRICTED @@ -0,0 +1 @@ +DENY_THRESHOLD_RESTRICTED = 1 diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/DENY_THRESHOLD_ROOT b/root/etc/e-smith/templates/etc/denyhosts.conf/DENY_THRESHOLD_ROOT new file mode 100644 index 0000000..d7ba389 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/DENY_THRESHOLD_ROOT @@ -0,0 +1 @@ +DENY_THRESHOLD_ROOT = 1 diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/DENY_THRESHOLD_VALID b/root/etc/e-smith/templates/etc/denyhosts.conf/DENY_THRESHOLD_VALID new file mode 100644 index 0000000..271421e --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/DENY_THRESHOLD_VALID @@ -0,0 +1 @@ +DENY_THRESHOLD_VALID = 2 diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/FAILED_ENTRY_REGEX2 b/root/etc/e-smith/templates/etc/denyhosts.conf/FAILED_ENTRY_REGEX2 new file mode 100644 index 0000000..cc85d4b --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/FAILED_ENTRY_REGEX2 @@ -0,0 +1,3 @@ +# default EPEL does not work for SME ( trailing $) +FAILED_ENTRY_REGEX2 = (?P(Illegal|Invalid)) user (?P.*) from (::ffff:)?(?P\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}) + diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/FAILED_ENTRY_REGEX6 b/root/etc/e-smith/templates/etc/denyhosts.conf/FAILED_ENTRY_REGEX6 new file mode 100644 index 0000000..054274d --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/FAILED_ENTRY_REGEX6 @@ -0,0 +1,3 @@ +# default EPEL does not work for SME ( trailing $) +FAILED_ENTRY_REGEX6 = Did not receive identification string .*from (::ffff:)?(?P\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}) + diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/FAILED_ENTRY_REGEX7 b/root/etc/e-smith/templates/etc/denyhosts.conf/FAILED_ENTRY_REGEX7 new file mode 100644 index 0000000..79c8916 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/FAILED_ENTRY_REGEX7 @@ -0,0 +1,3 @@ +# default EPEL does not work for SME ( trailing $) +FAILED_ENTRY_REGEX7 = User (?P.*) from (::ffff:)?(?P\S+) not allowed because not listed in AllowUsers + diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/HOSTNAME_LOOKUP b/root/etc/e-smith/templates/etc/denyhosts.conf/HOSTNAME_LOOKUP new file mode 100644 index 0000000..1c5e3d8 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/HOSTNAME_LOOKUP @@ -0,0 +1 @@ +HOSTNAME_LOOKUP=YES diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/HOSTS_DENY b/root/etc/e-smith/templates/etc/denyhosts.conf/HOSTS_DENY new file mode 100644 index 0000000..67ddd92 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/HOSTS_DENY @@ -0,0 +1 @@ +HOSTS_DENY = /etc/hosts.deny_ssh diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/LOCK_FILE b/root/etc/e-smith/templates/etc/denyhosts.conf/LOCK_FILE new file mode 100644 index 0000000..fbb80cf --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/LOCK_FILE @@ -0,0 +1 @@ +LOCK_FILE = /var/run/denyhosts.pid diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/PURGE_DENY b/root/etc/e-smith/templates/etc/denyhosts.conf/PURGE_DENY new file mode 100644 index 0000000..ecf029a --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/PURGE_DENY @@ -0,0 +1 @@ +PURGE_DENY = 1w diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/RESET_ON_SUCCESS b/root/etc/e-smith/templates/etc/denyhosts.conf/RESET_ON_SUCCESS new file mode 100644 index 0000000..617e5f5 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/RESET_ON_SUCCESS @@ -0,0 +1 @@ +RESET_ON_SUCCESS = yes diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/SECURE_LOG b/root/etc/e-smith/templates/etc/denyhosts.conf/SECURE_LOG new file mode 100644 index 0000000..a19521d --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/SECURE_LOG @@ -0,0 +1 @@ +SECURE_LOG = /var/log/sshd/sshd.log diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/SMTP_FROM b/root/etc/e-smith/templates/etc/denyhosts.conf/SMTP_FROM new file mode 100644 index 0000000..2fa0a9b --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/SMTP_FROM @@ -0,0 +1 @@ +SMTP_FROM = DenyHosts diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/SMTP_HOST b/root/etc/e-smith/templates/etc/denyhosts.conf/SMTP_HOST new file mode 100644 index 0000000..0027ff5 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/SMTP_HOST @@ -0,0 +1 @@ +SMTP_HOST = localhost diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/SMTP_PORT b/root/etc/e-smith/templates/etc/denyhosts.conf/SMTP_PORT new file mode 100644 index 0000000..c8f7171 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/SMTP_PORT @@ -0,0 +1 @@ +SMTP_PORT = 25 diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/SMTP_SUBJECT b/root/etc/e-smith/templates/etc/denyhosts.conf/SMTP_SUBJECT new file mode 100644 index 0000000..60c9931 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/SMTP_SUBJECT @@ -0,0 +1 @@ +SMTP_SUBJECT = DenyHosts Report diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/SSHD_FORMAT_REGEX b/root/etc/e-smith/templates/etc/denyhosts.conf/SSHD_FORMAT_REGEX new file mode 100644 index 0000000..7d1f3ca --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/SSHD_FORMAT_REGEX @@ -0,0 +1 @@ +SSHD_FORMAT_REGEX = @[0-9a-f]\{24\}(?P.*) diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/SUCCESSFUL_ENTRY_REGEX b/root/etc/e-smith/templates/etc/denyhosts.conf/SUCCESSFUL_ENTRY_REGEX new file mode 100644 index 0000000..f084df4 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/SUCCESSFUL_ENTRY_REGEX @@ -0,0 +1,3 @@ +# default EPEL does not work for SME ( trailing $) +SUCCESSFUL_ENTRY_REGEX = Accepted (?P\S+) for (?P.*?) from (::ffff:)?(?P\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\})( port \d+)?( ssh2)? + diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS b/root/etc/e-smith/templates/etc/denyhosts.conf/SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS new file mode 100644 index 0000000..d13e056 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS @@ -0,0 +1 @@ +SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS=YES diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/SYSLOG_REPORT b/root/etc/e-smith/templates/etc/denyhosts.conf/SYSLOG_REPORT new file mode 100644 index 0000000..2d57175 --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/SYSLOG_REPORT @@ -0,0 +1 @@ +SYSLOG_REPORT=YES diff --git a/root/etc/e-smith/templates/etc/denyhosts.conf/WORK_DIR b/root/etc/e-smith/templates/etc/denyhosts.conf/WORK_DIR new file mode 100644 index 0000000..841b61e --- /dev/null +++ b/root/etc/e-smith/templates/etc/denyhosts.conf/WORK_DIR @@ -0,0 +1 @@ +WORK_DIR = /var/lib/denyhosts diff --git a/root/etc/e-smith/templates/var/lib/denyhosts/allowed-hosts/db_entries b/root/etc/e-smith/templates/var/lib/denyhosts/allowed-hosts/db_entries new file mode 100644 index 0000000..7af2c0c --- /dev/null +++ b/root/etc/e-smith/templates/var/lib/denyhosts/allowed-hosts/db_entries @@ -0,0 +1,4 @@ +{ + my @vals = split ",", ($denyhosts{ValidFrom} || ''); + $OUT = join "\n", @vals; +} diff --git a/root/etc/e-smith/templates/var/lib/denyhosts/allowed-hosts/localhost b/root/etc/e-smith/templates/var/lib/denyhosts/allowed-hosts/localhost new file mode 100644 index 0000000..7b9ad53 --- /dev/null +++ b/root/etc/e-smith/templates/var/lib/denyhosts/allowed-hosts/localhost @@ -0,0 +1 @@ +127.0.0.1 diff --git a/root/etc/e-smith/web/functions/denyhosts b/root/etc/e-smith/web/functions/denyhosts new file mode 100755 index 0000000..2695f58 --- /dev/null +++ b/root/etc/e-smith/web/functions/denyhosts @@ -0,0 +1,44 @@ +#!/usr/bin/perl -wT +# vim: ft=xml ts=8 sw=4 noet: +#---------------------------------------------------------------------- +# heading : Security +# description : SSH Denyhosts +# navigation : 5000 5250 +#---------------------------------------------------------------------- + +use strict; +use esmith::FormMagick::Panel::denyhosts; +my $f = esmith::FormMagick::Panel::denyhosts->new(); +$f->display(); + +__DATA__ +

+ + + + + SERVICE_STATUS + + + + + DESC_ADD_IP + + + + + + + + + + + +
+ diff --git a/root/usr/lib/systemd/system/denyhosts.service.d/49-koozali.conf b/root/usr/lib/systemd/system/denyhosts.service.d/49-koozali.conf new file mode 100644 index 0000000..9bd7b1a --- /dev/null +++ b/root/usr/lib/systemd/system/denyhosts.service.d/49-koozali.conf @@ -0,0 +1,8 @@ +[Service] +ExecStartPre= +ExecStartPre=/sbin/e-smith/service-status denyhosts +TimeoutStartSec=300 +Restart=always + +[Install] +WantedBy=sme-server-target diff --git a/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/denyhosts.pm b/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/denyhosts.pm new file mode 100755 index 0000000..deb8e63 --- /dev/null +++ b/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/denyhosts.pm @@ -0,0 +1,305 @@ +#!/usr/bin/perl -w + +package esmith::FormMagick::Panel::denyhosts; + +use strict; +use esmith::ConfigDB; +use esmith::FormMagick; +use esmith::util; +use esmith::cgi; +use File::Basename; +use Exporter; +use Carp; +use Data::Validate::IP; + +our @ISA = qw(esmith::FormMagick Exporter); + +our @EXPORT = qw(get_value get_prop change_settings RemoveIP); +my $scriptname = basename($0); + +our $VERSION = sprintf '%d.%03d', q$Revision: 1.00 $ =~ /: (\d+).(\d+)/; +our $db = esmith::ConfigDB->open + || warn "Couldn't open configuration database (permissions problems?)"; + + +sub new { + shift; + my $self = esmith::FormMagick->new(); + $self->{calling_package} = (caller)[0]; + bless $self; + return $self; +} + +sub get_prop +{ + my $fm = shift; + my $item = shift; + my $prop = shift; + + return $db->get_prop($item, $prop) || ''; +} + +sub get_value { + my $fm = shift; + my $item = shift; + return ($db->get($item)->value()); +} + +sub ip_number_or_blank +{ + my $self = shift; + my $ip = shift; + + if (!defined($ip) || $ip eq "") + { + return 'OK'; + } + return CGI::FormMagick::Validator::ip_number($self, $ip); +} + + +sub _get_valid_from +{ + my $self = shift; + + my $rec = $db->get('denyhosts'); + return undef unless($rec); + my @vals = (split ',', ($rec->prop('ValidFrom') || '')); + return @vals; +} + +sub ip_sort(@) +{ + return esmith::util::IPquadToAddr($a) <=> esmith::util::IPquadToAddr($b); +} + +sub show_valid_from_list +{ + my $self = shift; + my $q = $self->{cgi}; + + print '',$q->p($self->localise('VALIDFROM_DESC')),''; + + my @vals = $self->_get_valid_from(); + if (@vals) + { + print '', + $q->start_table({class => "sme-border"}),"\n"; + print $q->Tr( + esmith::cgi::genSmallCell($q, $self->localise('IP_ADDRESS'),"header"), + esmith::cgi::genSmallCell($q, $self->localise('REMOVE'),"header")); + my @vals_sorted= sort ip_sort @vals; + my @cbGroup = $q->checkbox_group(-name => 'validFromRemove', + -values => [@vals_sorted], -labels => { map {$_ => ''} @vals_sorted }); + foreach my $val (@vals_sorted) + { + print $q->Tr( + esmith::cgi::genSmallCell($q, $val, "normal"), + esmith::cgi::genSmallCell($q, shift(@cbGroup), + "normal")); + } + print ''; + } + else + { + print $q->Tr($q->td($q->b($self->localise('NO_ENTRIES_YET')))); + } + return ''; +} + +sub show_current_deny +{ + my $self = shift; + my $q = $self->{cgi}; + + print '',$q->p($self->localise('CURRENT_DENY_DESC')),''; + + my %vals = (); + if (open(DENY, "/etc/hosts.deny_ssh") ) { + %vals = map { m{DenyHosts: (.*) \| (.*)$}; $2 => $1; } grep /DenyHosts:/, ; + close DENY; + } + if (%vals) + { + print '', + $q->start_table({class => "sme-border"}),"\n"; + print $q->Tr( + esmith::cgi::genSmallCell($q, $self->localise('IP_ADDRESS'),"header"), + esmith::cgi::genSmallCell($q, $self->localise('FIRST_SEEN'),"header"), + esmith::cgi::genSmallCell($q, $self->localise('ACTION'),"header")); + + foreach my $val (sort ip_sort keys %vals) + { + my $action3 ="".$self->localise('REMOVE')."" . + " ".$self->localise('WHITELIST')."" ; + print $q->Tr( + esmith::cgi::genSmallCell($q, $val, "normal"), + esmith::cgi::genSmallCell($q, $vals{$val}, "normal"), + esmith::cgi::genSmallCell($q, $action3, "normal")); + } + print ''; + } + else + { + print $q->Tr($q->td($q->b($self->localise('NO_ENTRIES_YET')))); + } + return ''; +} + +sub add_new_valid_from +{ + my $self = shift; + my $q = $self->{cgi}; + + my $ip = $q->param('ip'); + + # do nothing if no ip was added + return 1 unless ($ip); + + my $rec = $db->get('denyhosts'); + unless ($rec) + { + return $self->error('ERR_NO_RECORD'); + } + + my $prop = $rec->prop('ValidFrom') || ''; + + my @vals = split /,/, $prop; + return '' if (grep /^$ip$/, @vals); # already have this entry + + if ($prop ne '') + { + $prop .= ",$ip"; + } + else + { + $prop = "$ip"; + } + $rec->set_prop('ValidFrom', $prop); + $q->delete('ip'); + return 1; +} + +sub remove_valid_from +{ + my $self = shift; + my $q = $self->{cgi}; + + my @remove = $q->param('validFromRemove'); + my @vals = $self->_get_valid_from(); + + foreach my $entry (@remove) + { + return undef unless $entry; + + unless (@vals) + { + print STDERR "ERROR: unable to load ValidFrom property from conf db\n"; + return undef; + } + + @vals = (grep { $entry ne $_ } @vals); + } + + my $prop; + if (@vals) + { + $prop = join ',',@vals; + } + else + { + $prop = ''; + } + $db->get('denyhosts')->set_prop('ValidFrom', $prop); + $q->delete('validFromRemove'); + + return 1; +} + +sub change_settings { + my ($fm) = @_; + my $q = $fm->{'cgi'}; + + my %conf; + + # Don't process the form unless we clicked the Save button. The event is + # called even if we chose the Remove link or the Add link. + return unless($q->param('Next') eq $fm->localise('SAVE')); + + my $ip = ($q->param ('ip') || ''); + my $status = ($q->param ('status') || 'status'); + + #------------------------------------------------------------ + # Looks good; go ahead and change the access. + #------------------------------------------------------------ + + my $rec = $db->get('denyhosts'); + $rec->set_prop('status', $status) if $rec; + return '' unless $fm->add_new_valid_from; + return '' unless $fm->remove_valid_from; + + unless ( system( "/sbin/e-smith/signal-event", "conf-denyhosts" ) == 0 ) + { + $fm->error('ERROR_UPDATING'); + return undef; + } + + if ( $rec->prop('status') eq 'disabled' ) + { + unless ( `/etc/init.d/denyhosts stop` ) + { + $fm->error('ERROR_STOPPING'); + return undef; + } + } + + $fm->success('SUCCESS'); +} + +# validate subnet + + + +# RemoveIP after validation +sub RemoveIP { + my $fm = shift; + my $q = $fm->{'cgi'}; + +# my ($fm) = @_; +# my $q = $fm->{'cgi'}; +# use Data::Dumper; +#warn Dumper($fm); + my %conf; + my $ip = ($q->param('IP') || ''); + my $whitelist = ($q->param('Whitelist'))? "true" : ''; + #check ip + my $validator=Data::Validate::IP->new; + + unless ($validator->is_ipv4($ip)) + { + $fm->error('ERROR_STOPPING'); + return undef; + } + $ip = $validator->is_ipv4($ip); + unless ( system( "/etc/e-smith/events/actions/denyhost-purge none $ip $whitelist".' >/dev/null 2>&1' ) == 0 ) + { + $fm->error('ERROR_UPDATING'); + return undef; + } + if ($whitelist ne "" ) { + $fm->success($fm->localise('SUCCESS_IP_WHITE').": $ip",'First'); + } + else + { + $fm->success($fm->localise('SUCCESS_IP').": $ip",'First'); + } +} + +sub back { + my $fm = shift; + my $q = $fm->{'cgi'}; + print "".$fm->localise('Back').""; +return; +} + +1; diff --git a/smeserver-denyhosts.spec b/smeserver-denyhosts.spec new file mode 100644 index 0000000..67da9a8 --- /dev/null +++ b/smeserver-denyhosts.spec @@ -0,0 +1,107 @@ +# $Id: smeserver-denyhosts.spec,v 1.10 2024/09/04 11:16:24 terryfage Exp $ +# Authority: unnilennium +# Name: Jean-Philippe Pialasse + +Summary: smeserver-denyhosts +%define name smeserver-denyhosts +%define version 2.9 +%define release 21 +Name: %{name} +Version: %{version} +Release: %{release}%{?dist} +License: GPL +Group: Applications/System +Source: %{name}-%{version}.tar.xz + +BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot +BuildArch: noarch +BuildRequires: e-smith-devtools >= 1.13.1-03 +Requires: smeserver-release >= 8.0 +Requires: denyhosts >= 2.6-20 +Requires: e-smith-formmagick >= 1.4.0-12 +Requires: e-smith-openssh >= 2.6.0-4 +Provides: perl(esmith::FormMagick::Panel::denyhosts) + +%description +Integration package to mesh denyhosts with SME Server. + +%prep +%setup + +%build +/usr/bin/perl createlinks + +%install +/bin/rm -rf $RPM_BUILD_ROOT +(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT) +/bin/rm -f %{name}-%{version}-filelist +/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist + +%files -f %{name}-%{version}-filelist +%defattr(-,root,root,-) + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +touch /etc/hosts.deny_ssh + +%changelog +* Sat Sep 07 2024 cvs2git.sh aka Brian Read 2.9-21.sme +- Roll up patches and move to git repo [SME: 12338] + +* Sat Sep 07 2024 BogusDateBot +- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, + by assuming the date is correct and changing the weekday. + +* Wed Sep 04 2024 Terry Fage 2.9-20.sme +- apply locale 2024-09-04.patch + +* Sat Jul 30 2022 Jean-Philippe Pialasse 2.9-19.sme +- add Provides perl(esmith::FormMagick::Panel::denyhosts) + +* Sat Jul 30 2022 Brian Read 2.9-18.sme +- Re-build and link to latest devtools [SME: 11997] + +* Fri Jul 22 2022 Jean-Philippe Pialasse 2.9-17.sme +- add to core backup [SME: 12003] + +* Thu Dec 09 2021 Jean-Philippe Pialasse 2.9-16.sme +- Re-build and link to latest devtools log path [SME: 11804] +- Re-build and link to latest devtools multiple rpm owner [SME: 11677] + +* Sun Aug 22 2021 Terry Fage 2.9-15.sme +- apply locale 2021-08-21 patch + +* Mon Mar 15 2021 Jean-Philippe Pialasse 2.9-14.sme +- change pid file reference [SME: 11254] +- increase timeout for the service file and restart always + +* Mon Mar 15 2021 Jean-Philippe Pialasse 2.9-12.sme +- import to SME10 [SME: 11459] +- remove template-custom as integrated in core [SME: 11254] + +* Sat Dec 07 2019 SME Translation Server 2.9-11.sme +- apply locale 2019-12-07 patch + +* Sun Mar 24 2019 Jean-Philipe Pialasse 2.9-10.sme +- ease unban [SME: 9458] + +* Mon Feb 06 2017 Jean-Philipe Pialasse 2.9-7.sme +- Re-build and link to latest devtools removing from whitelist does not remove the desired IP but a random one [SME: 10076] + +* Mon Mar 30 2015 JP Pialasse 2.9-6.sme +- Re-build and link to latest devtoolsed non working REGEX [SME: 8894] +- Re-build and link to latest devtoolsed should isntall epel version not repoforge [SME: 8892] + +* Sun Mar 29 2015 JP Pialasse 2.9-1.sme +- Re-build and link to latest devtoolsed path to perl modules + +* Mon Jun 16 2014 JP Pialasse 2.8-1.sme +- initial import to SME9 contribs + +* Sun Jul 14 2013 JP Pialasse 2.7-2.sme +- apply locale 2013-07-14 patch + +* Sun Jun 3 2012 JP PIALASSE tests@pialasse.com 2.7-1.sme +- Initial version