SmoothWall

Excellent router/firewall program

and it's free, http://www.smoothwall.org/ ( ver. 3.0 )

If you want to raise functionality that you get in free version you must install :

1. Advanced Proxy Advanced Proxy is an add-on module for the popular Linux based firewall distributions IPCop and SmoothWall, extending their web proxy functionality with a lot of versatile and useful additional features. The package contains a squid binary recompiled with advanced configuration options for maximum flexibility. The Advanced Proxy graphical user interface gives you access to much more settings than the built-in proxy GUI does.

2. url_filter URL database and internet filter for higher productivity & less bandwidth usage ...

3. sarg "Sarg - Squid Analysis Report Generator is a tool that allows you to view "where" your users are going to on the Internet. It provides much information about Squid users activities: times, bytes, sites, etc...

Install:

Install Advanced Proxy module by typing

~$ cd /tmp

~$ wget http://www.advproxy.net/download/swe3-32-advproxy-3.0.5.tar.gz

~$ tar -zxvf /tmp/swe3-32-advproxy-3.0.3.tar.gz

~$ /tmp/smoothwall-advproxy/install

After installing the module, the section "Services>Proxy" will be replaced by "Services>Advanced Proxy".

Install URL Filter module by typing

~$ cd /tmp

~$ wget http://www.urlfilter.net/download/swe3-32-urlfilter-1.5.3.tar.gz

~$ tar -zxvf /tmp/swe3-32-urlfilter-1.5.3.tar.gz

~$ /tmp/smoothwall-urlfilter/install

After installing the module, you can access the URL Filter configuration page at "Services>URL Proxy".

Install SARG module by typing

~$ cd /tmp

~$ wget http://aizat51.fileave.com/SmoothWall/sarg-swe3.tar.gz

~$ tar -zxvf sarg-swe3.tar.gz -C /

~$ ./install-sarg.sh

The install script will ask you if you would like the daily, weekly, monthly reports to be generated from crontab. If you answer yes, the squid logrotate process will be taken over by the monthly script and the lines in /etc/logrotate.d/squid commented out.

There are four jobs that are going to run: today, daily, weekly, and monthly. -> the today job runs every hour from 8am to 6pm. This keeps your Squid reports updated every hour. -> the daily job runs at midnight of every day. -> the weekly job runs on the first hour of the first day of every week. -> the monthly job runs on the 30th minute of the second hour of the first day of every month.

Just browse to the logs tab and there'll be a new sarg section where you'll be able to edit the config file. For the settings to be applied you have to click on save, especially the first time you load the page.

To view the reports , click on the daily, weekly, monthly hyperlinks. Note that those hyperlinks will only be active once the corresponding reports have been generated.

purge SARG daily and weekly reports of the previous month ( prevent inod usage to reach 100% )

script /etc/rc.d/rc.purge_sarg

Code:

#!/bin/bash

cd /var/www/html/sarg/weekly

find -type d -name "*-*" -exec rm -rf '{}' +

rm -f index.html

cd /var/www/html/sarg/daily

find -type d -name "*-*" -exec rm -rf '{}' +

rm -f index.html

and the following line in /etc/crontab

code:

00 03 1 * * root /etc/rc.d/rc.purge_sarg