|
楼主 |
发表于 2005-9-9 14:00:00
|
显示全部楼层
要安DG好像还要先安装这个
Documentation version 2.2
Mod version 9.0
Last edited: 02/07/2005
History:
1.0 - First release (0.75) (10/08/04)
1.01 - Changed clamd startup script to work better with DansGuardian GUI
2.0 - ClamAV 0.80
2.01 - Fixed the clamd startup script.
3.0 - ClamAV 0.81
4.0 - ClamAV 0.82
5.0 - ClamAV 0.83
5.01 - Added missing startup scripts
6.0 - ClamAV 0.84
6.01 - Fixed clamd.conf.
7.0 - ClamAV 0.85
8.0 - ClamAV 0.85.1
9.0 - ClamAV 0.86.1
10.0 - ClamAV 0.86.2
1. What this mod provides
This mod provides the ClamAV daemon, virus scanning utilities and freshclam utility to automatically update anti-virus definitions. It also provides the logrotate script to rotate the logs (weekly).
Please note that ClamAV cannot repair files. It does not attempt to remove any viri from the infected files and can only delete the entire file. The default configuration is to simply report the infection.
2. Installation
If you have ClamAV 0.75 or ClamAV 0.80 - ClamAV 0.86.1 currently installed this will be removed before ClamAV 0.86.2 is installed. It will not be backed up. If you wish to back it up please do so before you install this version of ClamAV.
Download the clamav-0.86.2.tgz archive (1.24Mb) from here or here and copy it to your SmoothWalls /tmp directory. Then, from the command line, cd into your /tmp directory and type:
Code:
tar -zxvf clamav-0.86.2.tgz -C /
This will unpack the archive and install script to the /tmp directory.
NOTE: If your smoothwall is NOT connected to the internet when you install ClamAV you will not be able to get the latest AV definitions. Without them ClamAV won't start. In this case please download some definitions from here or here to the /tmp directory on your SmoothWall's HD. If your SmoothWall IS connected to the internet during ClamAV installation you do not need these files.
To install ClamAV 0.86.2 run the install script like so:
Code:
./install-clamav.sh
If, when you install, you are not connected to the internet and the clamav definitions are in your /tmp directory the install script will install these and not check online for updated ones. If you are online when you install ClamAV you don't need this file as the Install script will get the latest virus definition files from the internet.
If you have ClamV 0.75 or ClamAV 0.80 - ClamAV 0.86.1 installed this will now be removed and ClamAV 0.86.2 will be installed. The install script is very basic and has worked fine on my main SmoothWall machine and my freshly installed test SmoothWall. If it doesn't work for you please post any errors given on here and I'll try to help.
3. Configuration
ClamAV requires little configuration and should work straight from the archive. Take a look at /etc/clamd.conf to see the options available if you do feel adventurous! The freshclam update utility also should require no attention. If you are not using the transparant proxy on SmoothWall and need to enter your proxy details then please edit the relevant lines in /etc/freshclam.conf.
The ClamAV virus definition files should have been updated during the installation process. If you wish to make sure it does work type from the command line: Code:
freshclam
Some text should scroll past and you will be informed if your definition files have been updated. If something isn't correct the resulting message will help you see what's wrong. You could also take a look at the log file for freshclam in /var/log/clamav/freshclam.log.
You don't have to have the clamd daemon running all of the time. It's only really of benefit if you want to continually monitor certain directories or you need the clamd for other mods but it's a good idea to see if it will start. From the command line type:
Code:
/usr/local/sbin/clamd
If all is ok you should be returned back to the command line after a short while. If not then the resulting error message will give you a clue as to why it's not working. You can also take a look at the clamd logfile; /var/log/clamav/clamd.log
You do not need to do this stage if you are planning to use the DGGUI
If you want the ClamAV daemon to start each time your SmoothWall does then open /etc/rc.d/rc.sysinit and add:
Code:
echo "Starting ClamAV 0.86.1 deamon..."
/usr/local/sbin/clamd
before
Code:
echo "Silencing kernel, syslog output on tty12"
echo >/proc/sys/kernel/printk "1 4 1 7"
There's no need to autostart the clamd daemon if all you want to use ClamAV for is DanGuardian http scanning.
4. Usage
There are two scanning tools available; clamscan and clamdscan. Clamdscan acts as a client of the clamd daemon and because of this requires that the daemon be running. Clamscan however, can run independantly of the daemon. Both are very similar in their usage but clamscan does give more options. Type
Code:
clamdscan --help
or
clamscan --help
to see the switches available.
To scan a directory on your computer type:Code:
clamscan -r -l /tmp/scan.txt /tmp
You should see a list of files scroll up your screen. The summary will show you the speed of the scan and if any files were infected. The resulting scan will create a text file in your /tmp directory called scan.txt. If you want to look at the scan results in more detail have a look at the text file created. To remove the infected files then add the --remove to the above command.
You can set up a weekly scan by adding the following to your /etc/crontab file:
Code:
# Run ClamAV once a week
@weekly root /usr/local/bin/clamscan --quiet -r -l /var/log/lastscan.txt /
You can set up daily av definition updates by adding the following to your crontab file:Code:
#Run freshclam every day at 9am
0 9 * * * root /usr/local/bin/freshclam --quiet >/dev/null
Alternatively, just type freshclam from the command line
5. Uninstalling
To uninstall any of the versions I've worked on (0.75, 0.80-0.86.1) then please run the following script:Code:
var/smoothwall/mods/clamav/clamav-uninstall.sh
Whichever version of ClamAV you had installed before should now be removed.
6. Known Issues / Problems
If you are using Steve McNeill's DansGuardian & ClamAV GUI then you will need to reinstall it to regain full DGGUI functionality.
7. Thanks
ClamAV development team for ClamAV
8. Further Reading
Please read the ClamAV docs for a better understanding of the ClamAV tools.
9. Notes
Clam AV does not repair infected files. clamscan can remove files though using the --remove switch.
I've succesfully installed this on a fresh install of SmoothWall (with all 4 fixes) and also my main SmoothWall, which is running many mods. I have experienced no problems as of yet. I am also using this with the DansGuardian 2.8.0.3 & AV 6.3.8 mod and there does not appear to be any compatability problems.
I've probably missed something so please highlight anything that is wrong. Do read the docs as they probably explain everything better than I have!
Kev
31/08/04 - Changed the clamd startup script so that it can be controlled via Steve McNeill's DansGuardian & ClamAV GUI
15/09/04 - Added download mirror
28/10/04 - ClamAV 0.80 archive posted
31/10/04 - Updated paths
03/11/04 - Included new clamd startup script - made CVD files available for download.
13/11/04 - Thanks to Brian (AwPhuch) for poining out the CRON error and telling me about the ClamAV / Freshclam update issue.
03/02/05 - Released ClamAV 0.81
07/02/05 - Released ClamAV 0.82
10/02/05 - Added known issue/fix regarding DGGUI
18/02/05 - Released ClamAV 0.83 with uninstall script
23/02/05 - Added download mirror.
27/02/05 - Added startup scripts back into archive. Thanks to Brian for noticing!
02/05/05 - Released ClamAV 0.84
03/05/05 - Misconfigured clamd.conf stopped clamd from starting. Fixed.
18/05/05 - ClamAV 0.85
07/06/05 - ClamAV 0.85.1
02/07/05 - ClamAV 0.86.1
28/07/05 - ClamAV 0.86.2 |
|