How To Install squidGuard on Fedora 34

squidGuard is Filter, redirector and access controller plugin for squid

Introduction

In this tutorial we learn how to install squidGuard on Fedora 34.

What is squidGuard

squidGuard can be used to - limit the web access for some users to a list of accepted/well known web servers and/or URLs only. - block access to some listed or blacklisted web servers and/or URLs for some users. - block access to URLs matching a list of regular expressions or words for some users. - enforce the use of domainnames/prohibit the use of IP address in URLs. - redirect blocked URLs to an “intelligent” CGI based info page. - redirect unregistered user to a registration form. - redirect popular downloads like Netscape, MSIE etc. to local copies. - redirect banners to an empty GIF. - have different access rules based on time of day, day of the week, date etc. - have different rules for different user groups. - and much more.. Neither squidGuard nor Squid can be used to - filter/censor/edit text inside documents - filter/censor/edit embeded scripting languages like JavaScript or VBscript inside HTML

We can use yum or dnf to install squidGuard on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install squidGuard.

Install squidGuard on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install squidGuard using dnf by running the following command:

sudo dnf -y install squidGuard

Install squidGuard on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install squidGuard using yum by running the following command:

sudo yum -y install squidGuard

How To Uninstall squidGuard on Fedora 34

To uninstall only the squidGuard package we can use the following command:

sudo dnf remove squidGuard

squidGuard Package Contents on Fedora 34

/etc/cron.daily/squidGuard
/etc/logrotate.d/squidGuard
/etc/squid/squidGuard.conf
/usr/bin/hostbyname
/usr/bin/sgclean
/usr/bin/squidGuard
/usr/bin/squidGuard-helper
/usr/bin/transparent-proxying-helper
/usr/lib/.build-id
/usr/lib/.build-id/33
/usr/lib/.build-id/33/6a4a2a3560c8fe9b8143567944c765ef8f3868
/usr/lib/systemd/system/squidGuard.service
/usr/lib/systemd/system/transparent-proxying.service
/usr/share/doc/squidGuard
/usr/share/doc/squidGuard/COPYING
/usr/share/doc/squidGuard/GPL
/usr/share/doc/squidGuard/LDAPFlow.txt
/usr/share/doc/squidGuard/authentication.html
/usr/share/doc/squidGuard/authentication.txt
/usr/share/doc/squidGuard/blacklists.tar.gz
/usr/share/doc/squidGuard/configuration.html
/usr/share/doc/squidGuard/configuration.txt
/usr/share/doc/squidGuard/configure.html
/usr/share/doc/squidGuard/configure.txt
/usr/share/doc/squidGuard/expressionlist.html
/usr/share/doc/squidGuard/expressionlist.txt
/usr/share/doc/squidGuard/extended.html
/usr/share/doc/squidGuard/extended.txt
/usr/share/doc/squidGuard/faq.html
/usr/share/doc/squidGuard/faq.txt
/usr/share/doc/squidGuard/features.html
/usr/share/doc/squidGuard/features.txt
/usr/share/doc/squidGuard/index.html
/usr/share/doc/squidGuard/install.html
/usr/share/doc/squidGuard/install.txt
/usr/share/doc/squidGuard/installation.html
/usr/share/doc/squidGuard/installation.txt
/usr/share/doc/squidGuard/ldap-ad-tips.html
/usr/share/doc/squidGuard/ldap-ad-tips.txt
/usr/share/doc/squidGuard/ldap.html
/usr/share/doc/squidGuard/ldap.txt
/usr/share/doc/squidGuard/runtimeops.html
/usr/share/doc/squidGuard/runtimeops.txt
/usr/share/doc/squidGuard/sample.conf
/usr/share/doc/squidGuard/squidGuard-simple-de.cgi
/usr/share/doc/squidGuard/squidGuard-simple.cgi
/usr/share/doc/squidGuard/squidGuard.cgi
/usr/share/doc/squidGuard/squidGuard.conf.k12ltsp.template
/usr/share/doc/squidGuard/squidGuard.gif
/usr/share/doc/squidGuard/troubleshoot.html
/usr/share/doc/squidGuard/troubleshoot.txt
/var/log/squid/squidGuard.log
/var/log/squidGuard
/var/squidGuard
/var/squidGuard/blacklists.tar.gz
/var/www/cgi-bin/babel.de
/var/www/cgi-bin/babel.en
/var/www/cgi-bin/babel.es
/var/www/cgi-bin/babel.fr
/var/www/cgi-bin/babel.nl
/var/www/cgi-bin/babel.no
/var/www/cgi-bin/babel.ru
/var/www/cgi-bin/squidGuard-simple-de.cgi
/var/www/cgi-bin/squidGuard-simple.cgi
/var/www/cgi-bin/squidGuard.cgi

References

Summary

In this tutorial we learn how to install squidGuard on Fedora 34 using yum and dnf.