¿De que va este post/tips? Acerca de cómo modificar el archivo de configuración de clamav en PMG para que pueda actualizar, pues el centro de actualizaciones de clamav está bloqueado para Cuba. Es decir, una alternativa más.
Entonces,
El archivo de configuración clave a editar se encuentra en /var/lib/pmg/templates/freshclam.conf.in, el cual debemos hacer backup, antes de modificar:
cp /var/lib/pmg/templates/freshclam.conf.in{,.bckp}
Y editarlo/dejarlo de la siguiente manera:
DatabaseOwner clamav LogVerbose false LogSyslog true LogFacility LOG_LOCAL6 LogFileMaxSize 0 Foreground false Debug false MaxAttempts 5 Checks 24 DatabaseDirectory /var/lib/clamav/ PidFile /var/run/clamav/freshclam.pid #DatabaseMirror database.clamav.net ConnectTimeout 30 ReceiveTimeout 30 ScriptedUpdates no CompressLocalDatabase no NotifyClamd /etc/clamav/clamd.conf Bytecode true SafeBrowsing true #DNSDatabaseInfo current.cvd.clamav.net PrivateMirror clamavdb.c3sl.ufpr.br DatabaseCustomURL http://clamavdb.c3sl.ufpr.br/main.cvd DatabaseCustomURL http://clamavdb.c3sl.ufpr.br/daily.cvd DatabaseCustomURL http://clamavdb.c3sl.ufpr.br/bytecode.cvd DatabaseCustomURL http://clamavdb.c3sl.ufpr.br/safebrowsing.cvd
El «c3sl» es el Centro de Computación Científica y Software Libre de la ‘Universidad Federal de Paraná’ en Brasil.
Si estás detrás de un proxy, actualiza en el archivo de configuración las directivas:
HTTPProxyServer
HTTPProxyPort
HTTPProxyUsername
HTTPProxyPassword
Para actualizar solamente dejes ejecutar:
freshclam
desde la consola. Listo!
Como extra y gracias a @Armandof les dare los links de 2 servidores mas espejos de clamav, uno cubano y otro no
https://www.syscu.net/download/clamav/
http://sysadmin.nat.cu/clamav/
Espero les sirva.
Me complace anunciar la creación de esta útil herramienta (SquidStats), para el análisis y monitoreo…
La inteligencia artificial está revolucionando las industrias al automatizar tareas, predecir patrones y permitiendo tomar…
Uno de los grandes retos al que nos podemos enfrentar cuando una aplicación crece, es…
Percona Monitoring and Management (PMM) es una herramienta de código abierto para la supervisión y…
Qué es lo que deseo hacer en este capítulo? Básicamente un sonoff, quiero encender/apagar las…
Hace algunos meses estoy escuchando hablar del proyecto Home Assistant (HA). En palabras literales del…
View Comments
Saludos tengo zimbra instalaado pero el clmav no me actualiza me da este error siempre
freshclam daemon 0.102.2 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
ClamAV update process started at Tue Dec 7 16:35:36 2021
WARNING: Can't query current.cvd.clamav.net
WARNING: Invalid DNS reply. Falling back to HTTP mode.
Reading CVD header (daily.cvd): WARNING: remote_cvdhead: Download failed (56) WARNING: Message: Failure when receiving data from the peer
WARNING: Failed to get daily database version information from server: https://database.clamav.net
ERROR: check_for_new_database_version: Failed to find daily database using server https://database.clamav.net.
Trying again in 5 secs...
Reading CVD header (daily.cvd): WARNING: remote_cvdhead: Download failed (56) WARNING: Message: Failure when receiving data from the peer
WARNING: Failed to get daily database version information from server: https://database.clamav.net
ERROR: check_for_new_database_version: Failed to find daily database using server https://database.clamav.net.
Trying again in 5 secs...
Reading CVD header (daily.cvd): ERROR: remote_cvdhead: Download failed (56) ERROR: Message: Failure when receiving data from the peer
WARNING: Failed to get daily database version information from server: https://database.clamav.net
ERROR: check_for_new_database_version: Failed to find daily database using server https://database.clamav.net.
Giving up on https://database.clamav.net...
Reading CVD header (daily.cvd): WARNING: remote_cvdhead: Download failed (56) WARNING: Message: Failure when receiving data from the peer
WARNING: Failed to get daily database version information from server: http://sysadmin.nat.cu/clamav/
ERROR: check_for_new_database_version: Failed to find daily database using server http://sysadmin.nat.cu/clamav/.
Trying again in 5 secs...
Reading CVD header (daily.cvd): WARNING: remote_cvdhead: Download failed (56) WARNING: Message: Failure when receiving data from the peer
WARNING: Failed to get daily database version information from server: http://sysadmin.nat.cu/clamav/
ERROR: check_for_new_database_version: Failed to find daily database using server http://sysadmin.nat.cu/clamav/.
Trying again in 5 secs...
Reading CVD header (daily.cvd): ERROR: remote_cvdhead: Download failed (56) ERROR: Message: Failure when receiving data from the peer
WARNING: Failed to get daily database version information from server: http://sysadmin.nat.cu/clamav/
ERROR: check_for_new_database_version: Failed to find daily database using server http://sysadmin.nat.cu/clamav/.
Giving up on http://sysadmin.nat.cu/clamav/...
ERROR: Update failed for database: daily
WARNING: fc_update_databases: fc_update_database failed: HTTP GET failed (11)
ERROR: Database update process failed: HTTP GET failed (11)
Excelente articulo, la verdad me sirvió de mucho
Me funcionó, muy aporte, gracias.
Una pregunta, y hay alguna forma de hacer un repo o mirror local de por ejemplo la uclv o jovenclub para que todos mis servidores linux no se actualicen directamente de internet?
Buenos días, aquí les dejo un mirror que funciona:
https://pivotal-clamav-mirror.s3.amazonaws.com/
Saludos
Saludos.
Hagan, además, el archivo inmutable para que ningún update lo sobreescriba:
chattr +i /var/lib/pmg/templates/freshclam.conf.in
:-)
Chicos pues yo tengo un problema a ver si me podéis ayudar. Por mucho que configuro la opción de Compresslocaldatabase = no se me descarga el archivo daily en .cld en vez de cvd que es como lo quiero ¿sabeis que me puede estar pasando?
Si tu PrivateMirror es clamavdb.c3sl.ufpr.br a mi tampoco se me baja el .cld me da error y me fije y es que no existe en ese servidor, no se si es eso lo que querias decir, saludos
Ese mirror ya no funciona, te recomiendo otro de los que muestran en los comentarios.
aumentar el tiempo de clamav y veras que funciona, este parametro a cambiar yo tengo 30 mb de internet y tuve que subirlo a 120 seg
seria asi
ConnectTimeout 130
ReceiveTimeout 130
Pues he probado las configuraciones aqui expuestas y siempre obtengo el mismo resultado: !Update failed.
freshclam
Thu Sep 24 09:01:25 2020 -> ClamAV update process started at Thu Sep 24 09:01:25 2020
Thu Sep 24 09:01:25 2020 -> ^DNS Update Info disabled. Falling back to HTTP mode.
Thu Sep 24 09:01:25 2020 -> Reading CVD header (daily.cld): Time: 0.4s, ETA: 0.0s [=============================>] 512B/512B
Thu Sep 24 09:01:26 2020 -> OK
Thu Sep 24 09:01:26 2020 -> daily.cvd database is up to date (version: 25792, sigs: 2284253, f-level: 63, builder: raynman)
Thu Sep 24 09:01:26 2020 -> Reading CVD header (main.cld): Time: 0.4s, ETA: 0.0s [=============================>] 162B/162B
Thu Sep 24 09:01:26 2020 -> ^remote_cvdhead: file not found: http://download.jovenclub.cu/antivirus/clamav//main.cld
Thu Sep 24 09:01:26 2020 -> Reading CVD header (main.cvd): Time: 0.4s, ETA: 0.0s [=============================>] 512B/512B
Thu Sep 24 09:01:26 2020 -> OK
Thu Sep 24 09:01:26 2020 -> main.cvd database is up to date (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr)
Thu Sep 24 09:01:26 2020 -> Reading CVD header (bytecode.cld): Time: 0.3s, ETA: 0.0s [=============================>] 162B/162B
Thu Sep 24 09:01:27 2020 -> ^remote_cvdhead: file not found: http://download.jovenclub.cu/antivirus/clamav//bytecode.cld
Thu Sep 24 09:01:27 2020 -> Reading CVD header (bytecode.cvd): Time: 0.4s, ETA: 0.0s [=============================>] 512B/512B
Thu Sep 24 09:01:27 2020 -> OK
Thu Sep 24 09:01:27 2020 -> bytecode.cvd database is up to date (version: 331, sigs: 94, f-level: 63, builder: anvilleg)
Thu Sep 24 09:01:27 2020 -> main.cvd is up to date (version: custom database)
Thu Sep 24 09:01:57 2020 -> ^Download failed (28) Thu Sep 24 09:01:57 2020 -> ^ Message: Timeout was reached
Thu Sep 24 09:01:57 2020 -> ^Can't download daily.cvd from http://download.jovenclub.cu/antivirus/clamav/daily.cvd
Thu Sep 24 09:01:57 2020 -> Trying again in 5 secs...
Thu Sep 24 09:02:32 2020 -> ^Download failed (28) Thu Sep 24 09:02:32 2020 -> ^ Message: Timeout was reached
Thu Sep 24 09:02:32 2020 -> ^Can't download daily.cvd from http://download.jovenclub.cu/antivirus/clamav/daily.cvd
Thu Sep 24 09:02:32 2020 -> Trying again in 5 secs...
Thu Sep 24 09:03:07 2020 -> ^Download failed (28) Thu Sep 24 09:03:07 2020 -> ^ Message: Timeout was reached
Thu Sep 24 09:03:07 2020 -> ^Can't download daily.cvd from http://download.jovenclub.cu/antivirus/clamav/daily.cvd
Thu Sep 24 09:03:07 2020 -> Trying again in 5 secs...
Thu Sep 24 09:03:42 2020 -> ^Download failed (28) Thu Sep 24 09:03:42 2020 -> ^ Message: Timeout was reached
Thu Sep 24 09:03:42 2020 -> ^Can't download daily.cvd from http://download.jovenclub.cu/antivirus/clamav/daily.cvd
Thu Sep 24 09:03:42 2020 -> Trying again in 5 secs...
Thu Sep 24 09:04:17 2020 -> !Download failed (28) Thu Sep 24 09:04:17 2020 -> ! Message: Timeout was reached
Thu Sep 24 09:04:17 2020 -> !Can't download daily.cvd from http://download.jovenclub.cu/antivirus/clamav/daily.cvd
Thu Sep 24 09:04:17 2020 -> Update failed for custom database URL: http://download.jovenclub.cu/antivirus/clamav/daily.cvd
Thu Sep 24 09:04:17 2020 -> ^fc_download_url_databases: fc_download_url_database failed: Connection failed (5)
Thu Sep 24 09:04:17 2020 -> !Database update process failed: Connection failed (5)
Thu Sep 24 09:04:17 2020 -> !Update failed.
Al final de la URL debes quitar el /, por ejemplo: http://download.jovenclub.cu/antivirus/clamav
aumentar este parametro a
ConnectTimeout 130
ReceiveTimeout 130
Puedes mostrar tu archivo de configuracion? cat /etc/clamav/freshclam.conf porque algo me dice que pusiste algo... mal saludos
Exacto: como lo dice Jesús... para actualizar desde la uclv yo utilizo:
https://antivirus.uclv.edu.cu/update/clamav/
https://antivirus.uclv.edu.cu/update/clamav/daily.cvd..
y etc (bytecode, dafebrowsing, etc) y trabaja bien.
Gracias por el tuto
Yo como lo tengo configurado es asi y pincha ok
DatabaseOwner clamav
UpdateLogFile /var/log/clamav/freshclam.log
LogVerbose false
LogSyslog false
LogFacility LOG_LOCAL6
LogFileMaxSize 0
LogRotate true
LogTime true
Foreground false
Debug false
MaxAttempts 5
DatabaseDirectory /var/lib/clamav
#DNSDatabaseInfo current.cvd.clamav.net
ConnectTimeout 30
ReceiveTimeout 30
TestDatabases yes
ScriptedUpdates yes
CompressLocalDatabase no
SafeBrowsing false
Bytecode true
NotifyClamd /etc/clamav/clamd.conf
# Check for new database 24 times a day
Checks 24
#DatabaseMirror db.local.clamav.net
#DatabaseMirror database.clamav.net
PrivateMirror download.jovenclub.cu/antivirus/clamav/
DatabaseCustomURL http://download.jovenclub.cu/antivirus/clamav/main.cvd
DatabaseCustomURL http://download.jovenclub.cu/antivirus/clamav/daily.cvd
DatabaseCustomURL http://download.jovenclub.cu/antivirus/clamav/bytecode.cvd
###DatabaseCustomURL http://download.jovenclub.cu/antivirus/clamav/safebrowsing.cvd
si fuera otro lugar como universidad de villaclara cambiar en el private mirrror y ponerlo parecido
Hola, esto me tiene medio loco, en /etc/clamav/freshclam.conf realizo el cambio en el PrivateMirror y me pincha bien. Reinicio la PC y se me va ese cambio. He probado a hacer lo que aquí se explica(/var/lib/pmg/templates/freshclam.conf.in) y no funciona, no se entera de que he cambiado freshclam.conf.in y sigue trabajando por /etc/clamav/freshclam.conf. Agradecería alguna idea