Download blacklist squidguard: The best blacklists for Squid proxy filter and how to install them
How to Download and Install SquidGuard for Web Filtering
Web filtering is a useful technique for controlling what websites users can access on a network. It can help improve security, productivity, bandwidth, and compliance. However, web filtering can also be a challenging task, especially if you have a large number of users with different needs and preferences.
download blacklist squidguard
Fortunately, there is a free and open source solution that can help you with web filtering: SquidGuard. SquidGuard is a plugin for Squid, a popular web proxy server for Linux. It allows you to define various access rules and filters based on blacklists, categories, keywords, time, IP addresses, and more. It is fast, flexible, and easy to use.
In this article, we will show you how to download and install SquidGuard on CentOS 7, and how to configure it for web filtering. We will also show you how to test the web filtering on different browsers and devices, and how to troubleshoot some common problems with SquidGuard.
Step 1: Install Squid Proxy Server
The first step is to install Squid proxy server on your CentOS 7 machine. Squid is a web proxy server that acts as an intermediary between web browsers and web servers. It can cache web content, improve performance, reduce bandwidth usage, and provide additional features such as web filtering.
To install Squid on CentOS 7, you can use the yum command as follows:
# yum install squid
This will install the latest version of Squid from the official CentOS repositories. You can check the version of Squid by running:
How to download and install squidguard blacklist
Squidguard blacklist download URL
Squidguard blacklist update script
Squidguard blacklist categories and domains
Squidguard blacklist UT1 Capitole project
Squidguard blacklist configuration file
Squidguard blacklist for pfSense package
Squidguard blacklist for squid proxy server
Squidguard blacklist for URL filtering and blocking
Squidguard blacklist for web content control
Squidguard blacklist from GitHub repository
Squidguard blacklist license and terms of use
Squidguard blacklist format and structure
Squidguard blacklist customisation and editing
Squidguard blacklist troubleshooting and error messages
Squidguard blacklist performance and speed
Squidguard blacklist comparison and review
Squidguard blacklist alternatives and options
Squidguard blacklist best practices and tips
Squidguard blacklist documentation and tutorial
Download squidguard blacklist with wget or curl
Download squidguard blacklist from command line or GUI
Download squidguard blacklist for Linux or Windows
Download squidguard blacklist for Debian or Ubuntu
Download squidguard blacklist for CentOS or Fedora
Download squidguard blacklist for FreeBSD or OpenBSD
Download squidguard blacklist for OPNsense or Smoothwall
Download squidguard blacklist for educational or corporate use
Download squidguard blacklist for adult or gambling sites
Download squidguard blacklist for malware or phishing sites
Download squidguard blacklist for social media or streaming sites
Download squidguard blacklist for gaming or dating sites
Download squidguard blacklist for cryptojacking or hacking sites
Download squidguard blacklist for filehosting or warez sites
Download squidguard blacklist for sports or news sites
Download squidguard blacklist for shopping or marketing sites
Download squidguard blacklist for religious or political sites
Download squidguard whitelist for trusted or safe sites
Download squidguard redirector for custom error pages
Download squidguard safe search engine for filtered results
How to download multiple squidguard blacklists
How to download updated squidguard blacklists
How to download compressed squidguard blacklists
How to download partial squidguard blacklists
How to download specific squidguard blacklists
How to verify squidguard blacklists checksum
How to backup squidguard blacklists
How to restore squidguard blacklists
How to delete squidguard blacklists
# squid -v
Next, you need to configure Squid and start the service. The main configuration file for Squid is /etc/squid/squid.conf. You can edit this file using your favorite text editor, such as vi or nano. For example:
# vi /etc/squid/squid.conf
In this file, you need to set a few options to make Squid work properly. Here are some of the options that you need to change or add:
Option
Description
visible_hostname
This option tells Squid the name of your server. You can use any name that you like, such as squid.example.com.
acl our_networks src
This option defines an access control list (ACL) that specifies which networks or IP addresses are allowed to use Squid. For example, if your internal network is 192.168.0.0/16, you can use acl our_networks src 192.168.0.0/16.
http_access allow our_networks This option allows the ACL that we defined earlier to access Squid. You can also use other options such as deny, allow all, or deny all to control the access.
http_port
This option tells Squid which port to listen on for incoming requests. The default port is 3128, but you can change it to any port that you like, such as 8080.
cache_dir
This option tells Squid where to store the cached web content. The default location is /var/spool/squid, but you can change it to any directory that you have enough disk space for. You also need to specify the size and type of the cache directory. For example, cache_dir ufs /var/spool/squid 10000 16 256 means that Squid will use the ufs type of cache directory with a size of 10 GB and 16 subdirectories with 256 files each.
After editing the configuration file, you need to save it and exit the editor. Then, you need to start the Squid service and enable it to run on boot. You can do this by running:
# systemctl start squid # systemctl enable squid
You can check the status of the Squid service by running:
# systemctl status squid
If everything is working fine, you should see something like this:
squid.service - Squid caching proxy Loaded: loaded (/usr/lib/systemd/system/squid.service; enabled; vendor preset: disabled) Active: active (running) since Wed 2021-06-21 11:30:08 UTC; 5min ago Main PID: 1234 (squid) Tasks: 4 Memory: 15.6M CGroup: /system.slice/squid.service 1234 /usr/sbin/squid -f /etc/squid/squid.conf 1235 (squid-1) -f /etc/squid/squid.conf 1236 (logfile-daemon) /var/log/squid/access.log 1237 (pinger) Jun 21 11:30:08 squid.example.com systemd[1]: Starting Squid caching proxy... Jun 21 11:30:08 squid.example.com squid[1234]: Squid Parent: will start 1 kids Jun 21 11:30:08 squid.example.com squid[1234]: Squid Parent: (squid-1) process 1235 started Jun 21 11:30:08 squid.example.com systemd[1]: Started Squid caching proxy.
Congratulations! You have successfully installed Squid proxy server on your CentOS 7 machine.
Step 2: Install SquidGuard Plugin
The next step is to install SquidGuard plugin on your CentOS 7 machine. SquidGuard is a plugin for Squid that allows you to define various access rules and filters based on blacklists, categories, keywords, time, IP addresses, and more. It is fast, flexible, and easy to use.
To install SquidGuard on CentOS 7, you can use the yum command as follows:
# yum install squidGuard
This will install the latest version of SquidGuard from the official CentOS repositories. You can check the version of SquidGuard by running:
# squidGuard -v
Next, you need to configure SquidGuard and enable the blacklist feature. The main configuration file for SquidGuard is /etc/squid/squidGuard.conf. You can edit this file using your favorite text editor, such as vi or nano. For example:
# vi /etc/squid/squidGuard.conf
In this file, you need to set a few options to make SquidGuard work properly. Here are some of the options that you need to change or add:
Option
Description
dbhome
This option tells SquidGuard where to find the blacklist database files. The default location is /var/lib/squidGuard/db, but you can change it to any directory that you have enough disk space for.
logdir
This option tells SquidGuard where to store the log files. The default location is /var/log/squidGuard, but you can change it to any directory that you have enough disk space for.
source
This option defines the source groups that can use SquidGuard. You can use various criteria to define the source groups, such as IP addresses, hostnames, domains, MAC addresses, and user names. For example, source students ip 192.168.0.0/24 means that the source group named students consists of all the IP addresses in the 192.168.0.0/24 network.
dest
This option defines the destination categories that SquidGuard can filter. You can use various criteria to define the destination categories, such as domains, URLs, expressions, and blacklists. For example, dest porn domainlist porn/domains urllist porn/urls expressionlist porn/expressions means that the destination category named porn consists of all the domains, URLs, and expressions that match the files in the porn directory.
acl
This option defines the access control rules that SquidGuard can apply. You can use various options to define the access control rules, such as allow, deny, redirect, rewrite, and log. For example, acl students pass !porn all redirect http://example.com/block.html default pass none redirect http://example.com/block.html means that the students source group can access all the destinations except porn, and if they try to access porn, they will be redirected to http://example.com/block.html; and the default source group can access none of the destinations, and if they try to access any destination, they will be redirected to http://example.com/block.html.
After editing the configuration file, you need to save it and exit the editor. Then, you need to enable the SquidGuard plugin in Squid by adding a line in /etc/squid/squid.conf as follows:
# vi /etc/squid/squid.conf
Add this line at the end of the file:
url_rewrite_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf
This tells Squid to use SquidGuard as a URL rewrite program with the specified configuration file.
Step 3: Configure SquidGuard Rules and Filters
The next step is to configure SquidGuard rules and filters according to your needs and preferences. You can use the SquidGuard web interface or the command line to do this.
To use the SquidGuard web interface, you need to install a web server such as Apache or Nginx on your CentOS 7 machine. You also need to install PHP and some dependencies for SquidGuard web interface. You can do this by running:
# yum install httpd php php-gd php-pear-DB
This will install Apache web server, PHP, GD library for graphics, and DB library for database access.
Next, you need to download and extract the SquidGuard web interface files from its official website. You can do this by running:
# cd /var/www/html # wget http://www.squidguard.org/Downloads/squidGuard-1.5.tar.gz # tar xzf squidGuard-1.5.tar.gz # mv squidGuard-1.5 squidguardmgr # rm squidGuard-1.5.tar.gz
This will download and extract the SquidGuard web interface files in /var/www/html/squidguardmgr directory.
Next, you need to configure the SquidGuard web interface by editing its configuration file in /var/www/html/squidguardmgr/config.inc.php. You can edit this file using your favorite text editor, such as vi or nano. For example:
# vi /var/www/html/squidguardmgr/config.inc.php
In this file, you need to set a few options to make SquidGuard web interface work properly. Here are some of the options that you need to change or add:
Option
Description
$conf['squidguard_bin']
This option tells SquidGuard web interface where to find the SquidGuard binary file. The default value is '/usr/bin/squidGuard', but you can change it if your SquidGuard binary file is located elsewhere.
$conf['squidguard_conf']
This option tells SquidGuard web interface where to find the SquidGuard configuration file. The default value is '/etc/s quid/squidGuard.conf', but you can change it if your SquidGuard configuration file is located elsewhere.
$conf['squid_bin']
This option tells SquidGuard web interface where to find the Squid binary file. The default value is '/usr/sbin/squid', but you can change it if your Squid binary file is located elsewhere.
$conf['squid_conf']
This option tells SquidGuard web interface where to find the Squid configuration file. The default value is '/etc/squid/squid.conf', but you can change it if your Squid configuration file is located elsewhere.
$conf['squidguard_log']
This option tells SquidGuard web interface where to find the SquidGuard log file. The default value is '/var/log/squidGuard/squidGuard.log', but you can change it if your SquidGuard log file is located elsewhere.
$conf['squid_log']
This option tells SquidGuard web interface where to find the Squid log file. The default value is '/var/log/squid/access.log', but you can change it if your Squid log file is located elsewhere.
$conf['admin_email']
This option tells SquidGuard web interface the email address of the administrator. You can use any email address that you like, such as admin@example.com.
$conf['admin_pass']
This option tells SquidGuard web interface the password of the administrator. You can use any password that you like, such as 123456. However, you should change it to a more secure password later.
After editing the configuration file, you need to save it and exit the editor. Then, you need to restart the Apache web server and the Squid service by running:
# systemctl restart httpd # systemctl restart squid
Now, you can access the SquidGuard web interface by opening your web browser and typing the URL of your server followed by /squidguardmgr. For example, http://squid.example.com/squidguardmgr. You should see something like this:
To log in, you need to enter the email address and password that you set in the configuration file. For example, admin@example.com and 123456. After logging in, you should see something like this:
On this page, you can set up common ACLs for SquidGuard, such as blocking adult content, gambling sites, social networks, etc. You can also create custom categories and target rules for different user groups, such as students, teachers, staff, etc. You can also use safe search engine and redirect mode options to enhance the web filtering.
To create a custom category, you need to click on the Add button under the Categories section. You should see something like this:
On this page, you need to enter a name and a description for your category. You also need to choose a type of source for your category, such as domain list, URL list, expression list, or blacklist. For example, if you want to create a category for blocking gaming sites, you can enter gaming as the name, Block gaming sites as the description, and URL list as the type of source. Then, you need to enter the URLs of the gaming sites that you want to block in the text area below. For example:
www.gamespot.com www.miniclip.com www.addictinggames.com www.kongregate.com www.pogo.com
After entering the URLs, you need to click on the Save button to save your category. You should see something like this:
On this page, you can see all the categories that you have created or imported from blacklists. You can also edit or delete them by clicking on the Edit or Delete buttons next to them.
To create a target rule for a user group, you need to click on the Add button under the Target Rules section. You should see something like this:
On this page, you need to enter a name and a description for your target rule. You also need to choose a source group and a destination category for your target rule. For example, if you want to create a target rule for blocking gaming sites for students, you can enter students_gaming as the name, Block gaming sites for students as the description, students as the source group, and gaming as the destination category. Then, you need to choose an action for your target rule, such as allow, deny, redirect, or rewrite. For example, if you want to redirect the students to a warning page when they try to access gaming sites, you can choose redirect as the action and enter the URL of the warning page in the text box below. For example:
http://example.com/warning.html
After entering the action, you need to click on the Save button to save your target rule. You should see something like this:
On this page, you can see all the target rules that you have created or imported from blacklists. You can also edit or delete them by clicking on the Edit or Delete buttons next to them.
To use safe search engine and redirect mode options, you need to click on the Options button under the Common ACLs section. You should see something like this:
On this page, you can enable or disable safe search engine and redirect mode options for SquidGuard. Safe search engine option forces the use of safe search mode for popular search engines such as Google, Bing, Yahoo, etc. Redirect mode option allows you to choose how SquidGuard handles the redirection of blocked URLs. You can choose between 302 (temporary), 301 (permanent), or 303 (see other) redirection codes.
After changing the options, you need to click on the Save button to save them.
Step 4: Apply the Changes and Test the Web Filtering
The final step is to apply the SquidGuard configuration and test the web filtering on different browsers and devices. To apply the SquidGuard configuration, you need to run the following command:
# squidGuard -C all
This wi