Prerequisites
Before you begin, ensure you have:- A working Squid-Cache installation
- Root or sudo access to your server
- Basic command-line knowledge
- Active internet connection
BlackWeb is designed specifically for Squid-Cache. Make sure Squid is installed and running before proceeding.
Quick Installation
Download BlackWeb
Download the latest pre-compiled BlackWeb blocklist:This downloads and extracts
blackweb.txt to your current directory.If multipart files exist
If multipart files exist
If the file is split into multiple parts due to size, use this script:
Verify File Integrity (Optional)
Verify the downloaded file matches the official checksum:You should see two matching hashes followed by “OK”.
Move to ACL Directory
Create the ACL directory and move the file:
You can use any directory you prefer. Just remember to update the path in the Squid configuration.
Configure Squid-Cache
Edit your Squid configuration file:Add these lines in the ACL section (before any
http_access allow rules):/etc/squid/squid.conf
Reload Squid
Test the configuration and reload Squid:
Troubleshooting configuration errors
Troubleshooting configuration errors
If you see errors:
- Check file path: Ensure
/etc/acl/blackweb.txtexists and is readable - Verify syntax: Make sure there are no typos in the ACL definition
- Check permissions: Ensure Squid can read the file:
- Review logs: Check
/var/log/squid/cache.logfor detailed error messages
What’s Next?
Advanced Configuration
Learn about advanced rules, allowlists, and optimization
Update Process
Set up automated updates to keep your blocklist current
Troubleshooting
Resolve common issues and optimize performance
Advanced Rules
Configure TLD blocking, Punycode filtering, and more
Quick Configuration Examples
Allow Essential Domains
Create an allowlist for essential services:/etc/acl/allowdomains.txt
/etc/squid/squid.conf
Block Additional Domains
Create a custom blocklist for domains not in BlackWeb:/etc/acl/blockdomains.txt
/etc/squid/squid.conf
Updating BlackWeb
To update to the latest version, simply download the new version and reload Squid:Common Issues
Squid won't start after adding BlackWeb
Squid won't start after adding BlackWeb
Solution: The file might be too large for your system’s memory limits. Check:Add:Then reload:
Web browsing is very slow
Web browsing is very slow
Solution: Squid needs to load the entire 118.8 MB file into memory. Ensure:
- Your server has adequate RAM (minimum 2GB recommended)
- Squid’s cache is properly configured
- Consider using SSD storage for Squid’s cache
Some legitimate sites are blocked
Some legitimate sites are blocked
Solution: Add them to an allowlist (see examples above). Remember, BlackWeb aggregates public lists and may include false positives.
Next Steps
Congratulations! You now have BlackWeb running on your Squid-Cache server. For more advanced configuration options, including:- Punycode/IDN blocking
- TLD-based filtering
- Streaming service controls
- Pattern-based blocking
