Configuring Squid for Open Mode Web Filtering

Squid is normally not used in the Open Mode of operation but there is a Filtering setting in Open Mode that requires squid to be operational.  When you are asked if you want to use filtering when configuring the Open Mode the system does NOT activate squid correctly to actually accomplish the web filtering functions!  The following instructions correct this issue:

The following steps allow you to configure squid to function in Open Mode filtering.

You need to create an init.sh script in the /mnt/floppy/zonecd directory in order to add the required settings to the squid.conf file then restart squid to execute the new settings.

Here is how it is done:

If you don’t already have an init.sh script then perform the following step – if you already have an init.sh script then skip the following step:

Notes:

  1. All steps are in blue and you press the Enter key to enter the step.
  2. All steps are performed in a terminal window or if using LessX mode on the command line.
  3. All command line entries are entered EXACTLY as seen here.
  4. Unix/Linux is a friendly operating system, it’s just picky about it’s friends!

touch /mnt/floppy/zonecd/init.sh

Now – edit the init.sh script:

nano /mnt/floppy/zonecd/init.sh

Type the following into the nano editor – if you are editing an existing init.sh script file then omit the first line below (you don’t need the #!/bin/sh twice in the script file):

#!/bin/sh
# insert ‘missing links’ into squid config for Open Mode operation during startup.
#
echo “# *****
acl wifi_network src 10.10.10.0/255.255.255.0
http_access allow localhost
http_access allow manager localhost
http_access deny manager
#
http_access deny !Safe_ports
http_access allow wifi_network
http_access deny all
http_port 127.0.0.1:3128″ >> /usr/local/squid/etc/squid.conf
#
# restart the squid deamon for changes to take effect.
#
echo “Restarting Squid for Open Mode filtering changes”
/etc/init.d/squid restart
#
# end of script

Now – save the init.sh script:

<ctrl>x (press and hold the Ctrl-key then press the x-key) and answer yes to save the file.

One last thing to do – in order for the init.sh script to execute it must have it’s permissions set to allow execution:

chmod 755 /mnt/floppy/zonecd/init.sh

You are done – when you reboot and setup the system in Open Mode with Filtering active the Dansguardian system will be operational.

That’s it – you should have a functional Dansguardian systen in Open Mode with Filtering set to Active during the PublicIP configuration steps.

NOTE: You may want to keep an eye on memory usage – Dansguardian and Squid require memory to function properly and since the PublicIP system runs from system memory (no hard disk swap files) you don’t want to run out of memory – best to run at least twice the normal memory you would run without filtering active just to be sure!

Leave a Reply

You must be logged in to post a comment.