Install Ubuntu server. Mine is on VMware Workstation, 8Gb of memory with 1 processor/4 core and 100Gb of disk.
- Accept defaults during install, but check the box to install ssh-server (you may need to use this later).
There are two files and two folders that need to be created on your docker server. I manually created the "/home/mosterho19-Docker-workingdir" folder on my system, but you can name it whatever you wish:
squid.conf -- there are over 9000 lines in the original squid.conf file; this file contains about 100 lines. All of the uncommented lines with some of the important comments were included. This contains the minimum required to get squidguard up and running. You may need to tweek this file to get your container up and running. Please see the github resource for this config file.
squidGuard.conf -- Currently setup to include all localnet IP addresses, a blacklist, and whitelist. The blacklists currenly include ads, adult, and malware. You will need to change the IP address of the redirect statement to match your IP (not sure if localhost will work). Please see the github resource for this config file.
NOTE: I have NOT yet created a working script to download the blacklists from this Blacklist FTP Download site just yet. Please see the following link for a web based download of blacklists.tar.gz (same Blacklist website here).
directory squidguard -- The blacklist files can be downloaded from the above link. To unzip, perform the following:
cd ./squidguard
sudo tar -xvzf blacklists.tar.gz
(tar flags: -x=extract v=verbose (which you can leave out) z=gzip format f=archive name)
** This does NOT create the db version of the files required by squidguard. This is one additional step I must figure out. Please see below and the "update_blacklist.sh" file in github for ideas.
directory squidguarderrors (used by the standalone httpd image) -- contains a couple folders and an index.html file. The html file is used for issuing a warning message when attempting to retrieve a blacklisted site.
The three extra .sh files (build-squid-image, start-squidguard, and stop-squidguard) are for convenience only, and you can create your own version of them as needed.
Once you setup the above folders and files, it should look something like this:
Work-in-Process/Issues:
I have not yet figured out how to download and rebuild the blacklists (and whitelist) in the "squidguard" folder. It works when I use Squidguard outside of Docker and just within a "regular" Ubuntu server.
The only thing I can currently offer is to install an instance of squidguard on the same server and run the "update-blacklist.sh" in a terminal session, then copy or scp (SSH copy command) the resulting folders to "(yourfolder)/squidguard/db"