{"id":2060,"date":"2011-07-01T13:18:40","date_gmt":"2011-07-01T13:18:40","guid":{"rendered":"http:\/\/www.bartbusschots.ie\/blog\/?p=2060"},"modified":"2014-08-05T20:08:14","modified_gmt":"2014-08-05T20:08:14","slug":"getting-clamxav-to-use-a-proxy-server","status":"publish","type":"post","link":"https:\/\/www.bartbusschots.ie\/s\/2011\/07\/01\/getting-clamxav-to-use-a-proxy-server\/","title":{"rendered":"Getting ClamXav to use a Proxy Server"},"content":{"rendered":"<p>I&#8217;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 <a href=\"http:\/\/www.clamxav.com\/\" target=\"_blank\">ClamXav<\/a> a go. I&#8217;d tried it a few years ago and wasn&#8217;t very happy, but I&#8217;d been told by friends that it has improved a lot since, and a first glance at the GUI suggests they&#8217;re right. Unfortunately I didn&#8217;t get very far with my initial testing this afternoon because I&#8217;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&#8217;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&#8217;t support proxies, but it actually does, they just didn&#8217;t bother to expose that functionality through the GUI.<\/p>\n<p>ClamXav is just a GUI wrapper for the free and open source <a href=\"http:\/\/www.clamav.net\/\" target=\"_blank\">Clam AntiVirus toolkit<\/a>, and it uses Clam&#8217;s regular auto-updating tool <code>freshclam<\/code>. Although the ClamXav GUI doesn&#8217;t give you control over the variables in the <code>freshclam<\/code> configuration file, that file does exist as part of ClamXav (<code>\/usr\/local\/clamXav\/etc\/freshclam.conf<\/code>), and if you edit it manually it will respect the settings specified in that file. If you&#8217;re not afraid of the Terminal, you can easily edit this configuration file manually to get ClamXav to use a proxy server for updates.<\/p>\n<p><!--more--> These instructions will only work if you&#8217;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 (<code>Applications\u00e2\u2020\u2019Utilities\u00e2\u2020\u2019Terminal<\/code>), and then entering the command:<\/p>\n<pre>\r\nsudo nano \/usr\/local\/clamXav\/etc\/freshclam.conf\r\n<\/pre>\n<p>This will open the <code>freshclam<\/code> configuration file in the <code>nano<\/code> text editor (if you&#8217;re comfortable on the Terminal you&#8217;ll probably prefer to use VI of course). Within this file, all lines starting with a <code>#<\/code> are considered comments, and ignored by <code>freshclam<\/code> when it loads it&#8217;s configuration. Lines starting with a <code>#<\/code> are said to be &#8220;commented out&#8221;. You need to scroll down through the file (using the cursor keys in <code>nano<\/code>) until you find the commented out proxy directives which will look something like this:<\/p>\n<pre>\r\n# Proxy settings\r\n# Default: disabled\r\n#HTTPProxyServer myproxyserver.com\r\n#HTTPProxyPort 1234\r\n#HTTPProxyUsername myusername\r\n#HTTPProxyPassword mypass\r\n<\/pre>\n<p>You need to edit this section of the file to remove the <code>#<\/code> from the front of the <code>HTTPProxyServer<\/code> and <code>HTTPProxyPort<\/code> lines, and then you need to replace the place-holder values (<code>myproxyserver.com<\/code> and <code>1234<\/code>) with the correct values for your proxy server. If your proxy server requires authentication you&#8217;ll also have to un-comment the two lines directly below these lines and enter your authentication details there.<\/p>\n<p>You should be left with something that looks like this:<\/p>\n<pre>\r\n# Proxy settings\r\n# Default: disabled\r\nHTTPProxyServer proxy1.mydomain.ie\r\nHTTPProxyPort 3128\r\n#HTTPProxyUsername myusername\r\n#HTTPProxyPassword mypass\r\n<\/pre>\n<p>Now you just need to save the file and exit the editor. In <code>nano<\/code> press <code>ctrl+x<\/code> and then hit <code>y<\/code> when asked if you want to save, and <code>enter<\/code> to confirm the file name to save to (it will default to the correct file name).<\/p>\n<p>Restart ClamXav and you should now be able update your definitions without further issues.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;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&#8217;d tried it a few years ago and wasn&#8217;t very happy, but I&#8217;d been told by friends that it has improved a lot since, and a [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[12,17,446],"tags":[390,392,26,391,458],"series":[],"class_list":["post-2060","post","type-post","status-publish","format-standard","hentry","category-computers-tech","category-security","category-sysadmin","tag-antivirus","tag-clamxav","tag-os-x","tag-proxies","tag-tutorial"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p7t9xK-xe","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/posts\/2060","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/comments?post=2060"}],"version-history":[{"count":6,"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/posts\/2060\/revisions"}],"predecessor-version":[{"id":7477,"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/posts\/2060\/revisions\/7477"}],"wp:attachment":[{"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/media?parent=2060"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/categories?post=2060"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/tags?post=2060"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/www.bartbusschots.ie\/s\/wp-json\/wp\/v2\/series?post=2060"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}