Viralator - Install Guide - Slackware

By David Wilson (dave at linuxbox.co.za)


Hi !

Well done on creating an excellent product ! It works great !
Here is my config:
Slackware Linux 7.1
Apache 1.3.14
Squirm 1.0betaB
Squid 2.3Stable4
Viralator 0.8

Everything works great, I'm so impressed I wrote a step-by-step install guide for anyone that needs it, maybe it will be useful on your site ?

Well done, please let me know if I have done anything incorrectly ! ;-)
Thanks

Kindest regards
David Wilson


Installing Viralator antivirus scanner for Squid using Squirm

Please note that your virus scanner must be installed already ! (I used Mcaffee uvscan).

Squid

1) Get Squid from http://www.squid-cache.org
2) tar -zxvf squid-x.tar.gz
3) cd squid-x
4) ./configure --prefix=/usr/local/squid
5) make
6) make install
7) groupadd squid
8) useradd -g squid -s /dev/null squid
9) mkdir /cache
10) chown -R squid:squid /usr/local/squid/logs
11) chown -R squid:squid /cache
12) pico /usr/local/squid/etc/squid.conf and set the following values
cache_dir /cache 2000 16 256 (2000 means 2gig for cache storage).
http_port 8080
http_access allow all
cache_effective_user squid
cache_effective_group squid
13) ln -s /usr/local/squid/bin/squid /bin/squid
14) squid -z
15) /usr/local/squid/bin/RunCache &
16) Add "/usr/local/squid/bin/RunCache &" to /etc/rc.d/rc.local to start Squid automatically on reboot.

Apache

1) Get Apache from http://www.apache.org
2) tar -zxvf apache-x.tar.gz
3) cd apache-x
4) groupadd viralator
5) useradd -g viralator -s /dev/null viralator
6) ./configure --prefix=/usr/local/apache --enable-suexec --suexec-caller=nobody
7) make
8) make install
9) ln -s /usr/local/apache/bin/apachectl /bin/apachectl
10) apachectl start
11) Add "/usr/local/apache/bin/apachectl start" to /etc/rc.d/rc.local to start Apache automatically on reboot.

Squirm

1) Get Squirm from http://www.senet.com.au/squirm/
2) tar -zxvf squirm-x.tar.gz
3) cd squirm-x/regex
4) ./configure
5) make clean
6) make
7) cp -p regex.o regex.h .. (Note the ".." !)
8) cd ..
9) pico Makefile and make sure that the specific files will be installed with user=squid and group=squid (Default).
10) make
11) make install
12) cd /usr/local/squirm/etc
13) cp squirm.local.dist squirm.local
14) cp squirm.patterns.dist squirm.patterns
15) chgrp squid squirm.local
16) chgrp squid squirm.patterns
17) pico squirm.local and set local IP addresses that squirm will apply to e.g:
127.0.0
10.0.0
192.168.0
18) pico /usr/local/squid/etc/squid.conf and add the following values:
redirect_program /usr/local/squirm/bin/squirm
redirect_children 10
19) squid -k shutdown (Squid will restart automatically via RunCache).

Viralator

1) Get Viralator from http://viralator.loddington.com
2) cd /usr/src
3) mkdir viralator
4) mv viralator-x.zip /usr/src/viralator
5) cd /usr/src/viralator
6) unzip viralator-x.zip
7) cp viralator.cgi /usr/local/apache/cgi-bin
8) cd /usr/local/apache/cgi-bin/
9) chown viralator:viralator viralator.cgi
10) chmod 755 viralator.cgi
11) pico viralator.cgi and set the following values:
$downloads = "/usr/local/apache/htdocs/downloads"; # The directory
$downloadsdir = "/downloads/";
12) Also set your options for your virus scanner in viralator.cgi.
13) mkdir /usr/local/apache/htdocs/downloads
14) chown viralator:viralator /usr/local/apache/htdocs/downloads
15) chmod 755 /usr/local/apache/htdocs/downloads
16) mkdir /downloads
17) chown viralator:viralator /downloads
18) chmod 755 /downloads
19) pico /usr/local/squirm/etc/squirm.patterns and add the following (192.168.0.1 is the internal network interface in this example):
abortregexi (^http://192\.168\.0\.1/.*) #eg (^http://192\.168\.100\.1/.*)
abortregexi (^http://mail.linuxbox.co.za.*)
regexi (^.*\.zip$) http://192.168.0.1/cgi-bin/viralator.cgi?url=|\1
regexi (^.*\.doc$) http://192.168.0.1/cgi-bin/viralator.cgi?url=|\1
regexi (^.*\.exe$) http://192.168.0.1/cgi-bin/viralator.cgi?url=|\1
20) squid -k shutdown (Squid will restart automatically via RunCache).
21) apachectl stop
22) apachectl start

All done !

David Wilson
www.linuxbox.co.za
2001/04/11