S4 Web Interface Installation

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
cd s4_core/

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:

cd install
useradd s4
passwd s4
mysqladmin -u root -p create s4
mysql -u root -p
connect s4
source s4.sql
use mysql
set password for 's4' = password('setyourpassword');
flush privileges;

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.

cd /var/www/
vi globals.inc

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

S4 Documentation Home

Leave a Reply

Your email address will not be published. Required fields are marked *


About Me

Iain Foulds, 33 years old. Originally from England, now living in Seattle. I currently work as a Senior Content Developer for Microsoft writing about Azure VMs. Gamer. Very passionate about photography. Comments and opinions expressed here are my own. More...