Configuración de #ClamAV en #PMG

¿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:

Y editarlo/dejarlo de la siguiente manera:

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:

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.

¿De cuánta utilidad te ha parecido este contenido?

¡Haz clic en una estrella para puntuar!

Promedio de puntuación 4.9 / 5. Recuento de votos: 18

Hasta ahora, ¡no hay votos!. Sé el primero en puntuar este contenido.

20 comentarios


  1. Warning: Undefined array key 1 in /var/www/html/sysadminsdecuba/wp-content/plugins/wp-useragent/wp-useragent-detect-os.php on line 668
    Firefox 75.0 Firefox 75.0 Ubuntu x64 Ubuntu x64
    Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0

    También se pueden usar las bases del mirror de microsoft… como cambia el tiempo…

    https://packages.microsoft.com/clamav/

  2. Google Chrome 81.0.4044.117 Google Chrome 81.0.4044.117 Android 10 Android 10
    Mozilla/5.0 (Linux; Android 10; Pixel 3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.117 Mobile Safari/537.36

    Si así lo tengo y me ha funcionado sin problema. Slds

  3. Opera 68.0.3618.104 Opera 68.0.3618.104 Windows 10 x64 Edition Windows 10 x64 Edition
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 OPR/68.0.3618.104

    Buenas, me dice que el fichero es de solo lectura, como lo modifico…

  4. Firefox 72.0 Firefox 72.0 Windows 7 x64 Edition Windows 7 x64 Edition
    Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0

    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

  5. Opera 70.0.3728.154 Opera 70.0.3728.154 Windows 10 x64 Edition Windows 10 x64 Edition
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36 OPR/70.0.3728.154

    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


  6. Warning: Undefined array key 1 in /var/www/html/sysadminsdecuba/wp-content/plugins/wp-useragent/wp-useragent-detect-os.php on line 668
    Firefox 81.0 Firefox 81.0 Ubuntu x64 Ubuntu x64
    Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0

    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.

  7. Google Chrome 85.0.4183.102 Google Chrome 85.0.4183.102 Windows 10 x64 Edition Windows 10 x64 Edition
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36

    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?

  8. Firefox 80.0 Firefox 80.0 Windows 10 x64 Edition Windows 10 x64 Edition
    Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0

    Puedes mostrar tu archivo de configuracion? cat /etc/clamav/freshclam.conf porque algo me dice que pusiste algo… mal saludos

  9. Firefox 80.0 Firefox 80.0 Windows 10 x64 Edition Windows 10 x64 Edition
    Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0

    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

  10. Opera 71.0.3770.228 Opera 71.0.3770.228 Windows 10 x64 Edition Windows 10 x64 Edition
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 OPR/71.0.3770.228

    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

  11. Opera 71.0.3770.228 Opera 71.0.3770.228 Windows 10 x64 Edition Windows 10 x64 Edition
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 OPR/71.0.3770.228

    aumentar este parametro a
    ConnectTimeout 130
    ReceiveTimeout 130

  12. Firefox 81.0 Firefox 81.0 Windows 10 x64 Edition Windows 10 x64 Edition
    Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0

    Ese mirror ya no funciona, te recomiendo otro de los que muestran en los comentarios.


  13. Warning: Undefined array key 1 in /var/www/html/sysadminsdecuba/wp-content/plugins/wp-useragent/wp-useragent-detect-os.php on line 668
    Firefox 83.0 Firefox 83.0 Ubuntu x64 Ubuntu x64
    Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0

    Saludos.

    Hagan, además, el archivo inmutable para que ningún update lo sobreescriba:

    chattr +i /var/lib/pmg/templates/freshclam.conf.in

    🙂


  14. Warning: Undefined array key 1 in /var/www/html/sysadminsdecuba/wp-content/plugins/wp-useragent/wp-useragent-detect-os.php on line 668
    Firefox 84.0 Firefox 84.0 Ubuntu x64 Ubuntu x64
    Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0

    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?

  15. Firefox 86.0 Firefox 86.0 Windows 10 Windows 10
    Mozilla/5.0 (Windows NT 10.0; rv:86.0) Gecko/20100101 Firefox/86.0

    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)

Dejar una contestacion

Tu dirección de correo electrónico no será publicada.