Jul
1
Getting ClamXav to use a Proxy Server
Filed Under Computers & Tech, Security, System Administration on July 1, 2011 at 1:18 pm
I’ve been looking at different free Mac AV solutions so that I can make recommendations to less-computer-savy family members, and this afernoon I decided to give ClamXav a go. I’d tried it a few years ago and wasn’t very happy, but I’d been told by friends that it has improved a lot since, and a first glance at the GUI suggests they’re right. Unfortunately I didn’t get very far with my initial testing this afternoon because I’m in an environment where I have to use an HTTP proxy server to access the net, and ClamXav appears not to support proxies at first glance. It ignores OS X’s system-wide proxy settings, and it has no interface elements of its own to allow you to specify a proxy server manually. This implies that ClamXav doesn’t support proxies, but it actually does, they just didn’t bother to expose that functionality through the GUI.
ClamXav is just a GUI wrapper for the free and open source Clam AntiVirus toolkit, and it uses Clam’s regular auto-updating tool freshclam
. Although the ClamXav GUI doesn’t give you control over the variables in the freshclam
configuration file, that file does exist as part of ClamXav (/usr/local/clamXav/etc/freshclam.conf
), and if you edit it manually it will respect the settings specified in that file. If you’re not afraid of the Terminal, you can easily edit this configuration file manually to get ClamXav to use a proxy server for updates.
These instructions will only work if you’re logged into an admin account, so if you normally run in a non-admin account, please log into your admin account before continuing. Start by opening a Terminal window (Applications→Utilities→Terminal
), and then entering the command:
sudo nano /usr/local/clamXav/etc/freshclam.conf
This will open the freshclam
configuration file in the nano
text editor (if you’re comfortable on the Terminal you’ll probably prefer to use VI of course). Within this file, all lines starting with a #
are considered comments, and ignored by freshclam
when it loads it’s configuration. Lines starting with a #
are said to be “commented out”. You need to scroll down through the file (using the cursor keys in nano
) until you find the commented out proxy directives which will look something like this:
# Proxy settings # Default: disabled #HTTPProxyServer myproxyserver.com #HTTPProxyPort 1234 #HTTPProxyUsername myusername #HTTPProxyPassword mypass
You need to edit this section of the file to remove the #
from the front of the HTTPProxyServer
and HTTPProxyPort
lines, and then you need to replace the place-holder values (myproxyserver.com
and 1234
) with the correct values for your proxy server. If your proxy server requires authentication you’ll also have to un-comment the two lines directly below these lines and enter your authentication details there.
You should be left with something that looks like this:
# Proxy settings # Default: disabled HTTPProxyServer proxy1.mydomain.ie HTTPProxyPort 3128 #HTTPProxyUsername myusername #HTTPProxyPassword mypass
Now you just need to save the file and exit the editor. In nano
press ctrl+x
and then hit y
when asked if you want to save, and enter
to confirm the file name to save to (it will default to the correct file name).
Restart ClamXav and you should now be able update your definitions without further issues.
[…] The GUI provides home users with all the controls they need, but some corporate users may have issues. In particular, the app does neither obeys OS X system-wide proxy settings, nor provides a GUI to specify custom settings. The functionality is there though, it’s just not presented in the GUI, so a small tweak from the Terminal will sort you out:http://www.bartbusschots.ie/blog/?p=2060 […]
> Unfortunately I didn’t get very far with my initial testing
> this afternoon because I’m in an environment where I have
> to use an HTTP proxy server to access the net, and
> ClamXav appears not to support proxies at first glance.
Actually, there is a small helper process called “ClamXavProxyHelper” which runs during setup and attempts to accomplish what you explained here. Unfortunately it doesn’t work for everybody and apparently you are one of those. Some have been able to fix things by simply launch it via the Terminal app, but even that has not worked for all.
Very helpfull, thanks!
Works for me using the proxy IP address.
thank’s a lot ! it’s more safety for everyone.