The S4 web interface is what controls your system from an end-user point of view. It’s basically a large collection of PHP scripts that connect into a MySQL database to pull out information, read in data from log + configuration files, maniuplate lists of sites, uses + groups, etc. and restart services as required. It’s actually a very complex system that requires a few steps to actually get things setup.
First of all, you need to download the s4_core.tar.gz package and untar it:
tar -xvzf s4_core.tar.gz
Next, we need to actually setup out MySQL database, including the required tables + users. Within your previously un-tarred directory, please change to the ‘install‘ directory in order to import the database contents:
mysqladmin -u root -p create s4
mysql -u root -p
grant CREATE,INSERT,SELECT,DELETE,UPDATE on s4.* to s4;
set password for 's4' = password('setyourpassword');
We will now to run a script that will create some additional directories for us within DansGuardian and make some changes to our configuration file, along with adjusting file permissions so our web interface can manipulate the content. To make it easier to read + write lists of banned websites, users, filter groups, etc., we make some changes to the layout of DansGuardian. If you wish to still manually edit the DansGuardian files from the command line with the S4 web interface in use, please pay attention to the location of the files you will need to edit. Still within the ‘install‘ directory:
Next we need to copy the contents of our ‘www‘ data folder to our root Apache location:
cp www /var/
W should now find our Apache root directory populated with the S4 web interface. You will need to edit ‘globals.inc‘ to reflect the settings on your network. Settings include MySQL connection details, password servers, hostnames, etc.
You should now ammend your DNS server, which should be operating elsewhere within your network, to add a new record with the IP address of your S4 system. The recommended hostname is ‘schoolproxy‘, although you could add additional records such as ‘helpdesk‘.
You should now be able to access the S4 web front-end by loading up a web browser and accessing:
http://schoolproxy (ammend hostname if different)
The initial login will be those provided within the globals.inc file edited previously. From here, access the ‘User Management | Configure Access Rights’ section and add in the required users. These should ideally be tied in with your existing network user names, meaning there are no duplicate passwords – users authenticate with their network logon name + password when accessing the S4 web interface.
Next Step: Final Notes