• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Help to download and install mod_evasive

python

Regular Pleskian
As I can install the latest version of mod_evasive, I think I should do it from ssh because from interface plesk I do not see the option, but since ssh I do not know how to download the latest version use plesk onyx 17
 
When I execute the command it gives me this error

apxs -cia mod_evasive20.c

/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -std=gnu99 -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-1 -I/usr/include/apr-1 -c -o mod_evasive20.lo mod_evasive20.c && touch mod_evasive20.slo
/usr/lib64/apr-1/build/libtool: line 1114: gcc: command not found
apxs:Error: Command failed with rc=65536
 
thank you for your patience
Now give me these errors:


/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -std=gnu99 -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-1 -I/usr/include/apr-1 -c -o mod_evasive20.lo mod_evasive20.c && touch mod_evasive20.slo
mod_evasive20.c: In function 'create_hit_list':
mod_evasive20.c:118:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
mod_evasive20.c: In function 'access_checker':
mod_evasive20.c:142:39: error: 'conn_rec' has no member named 'remote_ip'
if (is_whitelisted(r->connection->remote_ip))
^
mod_evasive20.c:146:43: error: 'conn_rec' has no member named 'remote_ip'
n = ntt_find(hit_list, r->connection->remote_ip);
^
mod_evasive20.c:158:56: error: 'conn_rec' has no member named 'remote_ip'
snprintf(hash_key, 2048, "%s_%s", r->connection->remote_ip, r->uri);
^
mod_evasive20.c:165:47: error: 'conn_rec' has no member named 'remote_ip'
ntt_insert(hit_list, r->connection->remote_ip, time(NULL));
^
mod_evasive20.c:180:58: error: 'conn_rec' has no member named 'remote_ip'
snprintf(hash_key, 2048, "%s_SITE", r->connection->remote_ip);
^
mod_evasive20.c:187:47: error: 'conn_rec' has no member named 'remote_ip'
ntt_insert(hit_list, r->connection->remote_ip, time(NULL));
^
mod_evasive20.c:208:117: error: 'conn_rec' has no member named 'remote_ip'
snprintf(filename, sizeof(filename), "%s/dos-%s", log_dir != NULL ? log_dir : DEFAULT_LOG_DIR, r->connection->remote_ip);
^
mod_evasive20.c:212:13: warning: implicit declaration of function 'getpid' [-Wimplicit-function-declaration]
fprintf(file, "%ld\n", getpid());
^
mod_evasive20.c:212:13: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'int' [-Wformat=]
mod_evasive20.c:215:90: error: 'conn_rec' has no member named 'remote_ip'
LOG(LOG_ALERT, "Blacklisting address %s: possible DoS attack.", r->connection->remote_ip);
^
mod_evasive20.c:46:82: note: in definition of macro 'LOG'
#define LOG( A, ... ) { openlog("mod_evasive", LOG_PID, LOG_DAEMON); syslog( A, __VA_ARGS__ ); closelog(); }
^
mod_evasive20.c:221:78: error: 'conn_rec' has no member named 'remote_ip'
fprintf(file, "Subject: HTTP BLACKLIST %s\n\n", r->connection->remote_ip);
^
mod_evasive20.c:222:81: error: 'conn_rec' has no member named 'remote_ip'
fprintf(file, "mod_evasive HTTP Blacklisted %s\n", r->connection->remote_ip);
^
mod_evasive20.c:228:81: error: 'conn_rec' has no member named 'remote_ip'
snprintf(filename, sizeof(filename), system_command, r->connection->remote_ip);
^
mod_evasive20.c: In function 'destroy_hit_list':
mod_evasive20.c:301:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
mod_evasive20.c: In function 'access_checker':
mod_evasive20.c:229:21: warning: ignoring return value of 'system', declared with attribute warn_unused_result [-Wunused-result]
system(filename);
^
apxs:Error: Command failed with rc=65536
 
How can I download the patched version of Mod_evasive 24.c to download it to my server? I think I'm not doing it well for its installation
 
Creo que he instalado el módulo evasivo pero cuando trato de activarlo desde el panel plesk me de este error:

Código = estado salido = 1 12 de agosto 12:21:51 server.com systemd [1]: No se pudo iniciar el servidor HTTP Apache. Ago 12 12:21:51 server.com systemd [1]: Unidad httpd.service entró estado fallido. Ago 12 12:21:51 server.com systemd [1]: falló httpd.service. La ejecución de websrvmng: / usr / local / psa / admin / sbin / apache_control_adapter falló: Aug 12 12:21:51 server.com systemd [1]: Iniciando el Servidor HTTP Apache ... Aug 12 12:21:51 server.com Httpd [5134]: httpd: Error de sintaxis en la línea 57 de /etc/httpd/conf/httpd.conf: Error de sintaxis en la línea 78 de /etc/httpd/conf.modules.d/00-base.conf: No se puede Localizar la estructura del módulo API `evasive24_module 'en el archivo /usr/lib64/httpd/modules/mod_evasive24.so: /usr/lib64/httpd/modules/mod_evasive24.so: undefined symbol: evasive24_module Aug 12 12:21:51 server.com systemd [1]: httpd.service: proceso principal salido, code = exit, Kill: no puede encontrar el proceso "" Ago 12 12:21:51 server.com systemd [1]: httpd.service: proceso de control cerrado, Código = estado salido = 1 12 de agosto 12:21:51 server.com systemd [1]: No se pudo iniciar el servidor HTTP Apache. Ago 12 12:21:51 server.com systemd [1]: Unidad httpd.service entró estado fallido. Aug 12 12:21:51 server.com systemd [1]: falló httpd.service.
 
Last edited:
Hi, thanks for your interest in helping me but I do not get it, try the command:
su -c 'yum update --enablerepo=epel-testing mod_evasive-1.10.1-22.el7'

Error getting repository data for epel-testing, repository not found

When I try to install mod evasive it gives me the following message
yum update && yum install mod_evasive

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.sov.uk.goscomb.net
* extras: mirror.vorboss.net
* updates: mirror.vorboss.net
No packages marked for update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.sov.uk.goscomb.net
* extras: mirror.vorboss.net
* updates: mirror.vorboss.net
No package mod_evasive available.
Error: Nothing to do


I normally update the packages from plesk and the update does not have to do anything but the mod_evasive does not find it either.
 
At the end install mod_evasive correctly thanks to this page:
mod_evasiveでApacheのDoS対策 – CentOS 7


But now I'm having problems with plesk are surely problems of a previous bad installation, when I access the configuration of the server apache active evasive24 module and gives me a server error 500 and I get these errors:

Error: START httpd_modules_ctl --enable evasive24 websrvmng: execu /usr/local/psa/admin/sbin/apache_control_adaptertion failed: Aug 28 11:32:48 server.com systemd[1]: Starting The Apache HTTP Server... Aug 28 11:32:48 server.com httpd[30459]: httpd: Syntax error on line 58 of /etc/httpd/conf/httpd.conf: Syntax error on line 80 of /etc/httpd/conf.modules.d/00-base.conf: Can't locate API module structure `evasive24_module' in file /usr/lib64/httpd/modules/mod_evasive24.so: /usr/lib64/httpd/modules/mod_evasive24.so: undefined symbol: evasive24_module Aug 28 11:32:48 server.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE Aug 28 11:32:48 cartamasajes.com kill[30461]: kill: cannot find process "" Aug 28 11:32:48 server.com systemd[1]: httpd.service: control process exited, code=exited status=1 Aug 28 11:32:48 server.com systemd[1]: Failed to start The Apache HTTP Server. Aug 28 11:32:48 server.com systemd[1]: Unit httpd.service entered failed state. Aug 28 11:32:48 server.com systemd[1]: httpd.service failed. websrvmng: /usr/local/psa/admin/sbin/apache_control_adapter execution failed: Aug 28 11:32:48 server.com systemd[1]: Starting The Apache HTTP Server... Aug 28 11:32:48 server.com httpd[30459]: httpd: Syntax error on line 58 of /etc/httpd/conf/httpd.conf: Syntax error on line 80 of /etc/httpd/conf.modules.d/00-base.conf: Can't locate API module structure `evasive24_module' in file /usr/lib64/httpd/modules/mod_evasive24.so: /usr/lib64/httpd/modules/mod_evasive24.so: undefined symbol: evasive24_module Aug 28 11:32:48 server.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE Aug 28 11:32:48 server.com kill[30461]: kill: cannot find process "" Aug 28 11:32:48 server.com systemd[1]: httpd.service: control process exited, code=exited status=1 Aug 28 11:32:48 server.com systemd[1]: Failed to start The Apache HTTP Server. Aug 28 11:32:48 server.com systemd[1]: Unit httpd.service entered failed state. Aug 28 11:32:48 server.com systemd[1]: httpd.service failed.


It is worth mentioning that the evasive24 module appeared in plesk when installing with errors, someone tells me how I can repair this error to enable and disable mod_evasive from plesk or how to install mod_evasive but in plesk directly.

thanks greetings
 
Back
Top