A number of resources exist for configuring Squid with ClamAV as a transparent proxy server on Ubuntu, however some of the information appear to be incorrect for version 11.04, the following articles and notes will be of help. I’m using a windows based DHCP server behind Ubuntu and effectively using Ubuntu as a gateway from one network to another where my ISPs router sits. But you can tailor the idea to suit.
1. When installing Ubuntu Server include BIND for DNS, if you have already installed Ubuntu without BIND use sudo apt-get install bind9 dnsutils to install;
2. Configure your two network cards with different IP addresses, one for the LAN and one for the WAN side;
3. Configure BIND to act as a forwarder only using BIND9ServerHowto;
4. Install and configure Squid and ClamAV as explained here, I personally used the comment from Jayson D. Martinez How to Setup Transparent Squid Proxy Server in Ubuntu, but I did not install the web admin tools;
5. Also install the ClamAV Daemon using sudo apt-get install clamav-daemon
6. When configuring squid, check the default file thoroughly, consider making a backup and recreate the file from scratch;
7. The iptables configuration from here works better Squid transparent proxy with iptables
8. Configure a machine behind the second network card, using the Ubuntu server as a gateway and test.
If you have any problems check:-
- The squid log files in /var/log/squid/;
- The port number you configured in squid.conf is the same one you used in the iptables line and that you have added transparent to the http_port line of the squid.conf file;
- Manually configure a browser to use the ubuntu server as a proxy to rule out a problem with the iptables.
You could also extend this configuration using a web content filter like DansGuardian Squid Proxy Server On Ubuntu 9.04 Server With DansGuardian, ClamAV, And WPAD the link also contains useful notes on checking the ClamAV installation is updating correctly.



