ubuntuproxyubuntu-16.04antivirusclam

clamav update issue using proxy authentication


I am having trouble using proxy authentication for updating clamav. I added proxy information in /etc/clamav/freshclam.conf as shown below :-

# Proxy Setup
HTTPProxyServer myproxy
HTTPProxyPort 3128
HTTPProxyUsername proxyuser
HTTPProxyPassword proxypass

On saving the file, I get the following warning.

WARNING: Insecure permissions (for HTTPProxyPassword): /etc/clamav/freshclam.conf must have no more than 0700 permissions.

So I change the file permissions to 700 as suggested. Now I am getting an error.

ERROR: Can't open/parse the config file /etc/clamav/freshclam.conf

If I roll-back the permissions, it gives me warning. If I apply permissions I get an error, either case I can't get clamav to update.

It is only when I remove the authentication it tries to connect(I have to roll back permissions to 444 default), and I get the following error:-

Thu May 12 09:28:35 2017 -> ClamAV update process started at Thu May 12 09:28:35 2017
Thu May 12 09:28:35 2017 -> Connecting via myproxy
Thu May 12 09:28:35 2017 -> main.cvd is up to date (version: 58, sigs: 4566249, f-level: 60, builder: sigmgr)
Thu May 12 09:28:35 2017 -> Connecting via myproxy
Thu May 12 09:28:35 2017 -> WARNING: getfile: Unknown response from db.local.clamav.net
Thu May 12 09:28:35 2017 -> WARNING: Can't download daily.cvd from db.local.clamav.net
Thu May 12 09:28:36 2017 -> Trying again in 5 secs...
Thu May 12 09:28:41 2017 -> ClamAV update process started at Thu May 12 09:28:41 2017
Thu May 12 09:28:41 2017 -> Connecting via myproxy
Thu May 12 09:28:41 2017 -> main.cvd is up to date (version: 58, sigs: 4566249, f-level: 60, builder: sigmgr)
Thu May 12 09:28:41 2017 -> Connecting via myproxy
Thu May 12 09:28:41 2017 -> WARNING: getfile: Unknown response from db.local.clamav.net
Thu May 12 09:28:41 2017 -> WARNING: Can't download daily.cvd from db.local.clamav.net
Thu May 12 09:28:42 2017 -> Trying again in 5 secs...
Thu May 12 09:28:47 2017 -> ClamAV update process started at Thu May 12 09:28:47 2017
Thu May 12 09:28:47 2017 -> Connecting via myproxy
Thu May 12 09:28:47 2017 -> main.cvd is up to date (version: 58, sigs: 4566249, f-level: 60, builder: sigmgr)
Thu May 12 09:28:47 2017 -> Connecting via myproxy
Thu May 12 09:28:48 2017 -> WARNING: getfile: Unknown response from db.local.clamav.net
Thu May 12 09:28:48 2017 -> WARNING: Can't download daily.cvd from db.local.clamav.net
Thu May 12 09:28:48 2017 -> Trying again in 5 secs...
Thu May 12 09:28:53 2017 -> ClamAV update process started at Thu May 12 09:28:53 2017
Thu May 12 09:28:53 2017 -> Connecting via myproxy
Thu May 12 09:28:53 2017 -> main.cvd is up to date (version: 58, sigs: 4566249, f-level: 60, builder: sigmgr)
Thu May 12 09:28:53 2017 -> Connecting via myproxy
Thu May 12 09:28:54 2017 -> WARNING: getfile: Unknown response from db.local.clamav.net
Thu May 12 09:28:54 2017 -> WARNING: Can't download daily.cvd from db.local.clamav.net
Thu May 12 09:28:54 2017 -> Trying again in 5 secs...
Thu May 12 09:28:59 2017 -> ClamAV update process started at Thu May 12 09:28:59 2017
Thu May 12 09:28:59 2017 -> Connecting via myproxy
Thu May 12 09:28:59 2017 -> main.cvd is up to date (version: 58, sigs: 4566249, f-level: 60, builder: sigmgr)
Thu May 12 09:28:59 2017 -> Connecting via myproxy
Thu May 12 09:29:00 2017 -> ERROR: getfile: Unknown response from db.local.clamav.net
Thu May 12 09:29:00 2017 -> ERROR: Can't download daily.cvd from db.local.clamav.net
Thu May 12 09:29:00 2017 -> Giving up on db.local.clamav.net...
Thu May 12 09:29:00 2017 -> ClamAV update process started at Thu May 12 09:29:00 2017
Thu May 12 09:29:00 2017 -> Connecting via myproxy
Thu May 12 09:29:00 2017 -> main.cvd is up to date (version: 58, sigs: 4566249, f-level: 60, builder: sigmgr)
Thu May 12 09:29:00 2017 -> Connecting via myproxy
Thu May 12 09:29:01 2017 -> ERROR: getfile: Unknown response from database.clamav.net
Thu May 12 09:29:01 2017 -> ERROR: Can't download daily.cvd from database.clamav.net
Thu May 12 09:29:01 2017 -> Giving up on database.clamav.net...
Thu May 12 09:29:01 2017 -> Update failed. Your network may be down or none of the mirrors listed in /etc/clamav/freshclam.conf is working. Check http://www.clamav.net/doc/mirrors-faq.html for possible reasons.

I have tried all I can find. I did reconfigure as well

> dpkg-reconfigure clamav-freshclam

still the same result. The way I see this clamav is uanble to connect using proxy.


Solution

    1. Ensure the configuration file owned by the same user as is running clamav.
    2. Look at your proxy logs to see what is failing while downloading the daily file?