Question Locked

Squid: Acl Configuration

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi all,
Pls could someone help me with the correct syntax of the acl command for banning sites with certain words from being accessed from my network. The match should be for both url and content.

Tata

3 replies

by imran.khokhar

so simple & 100% work in (linux - redhat 7-9 fedora 1-6
simple add this lines

acl blocke url_regex -i windowsupdate xxx porn hotmom update.microsoft

http_access deny blocke

#service squid reload
hapy-hapy by

by benpal4ever

Good day...

you can try [url_regex -i]
Ex.
acl yourlan src 192.168.1.1/16
acl bannedsites url_regex -i http://www.sex.com/
http_access allow yourlan
http_access deny bannedsites

[you can use a text file that contain the list of pornsites you may wish to ban in your network. all you need to do is to point the directory of your text file in the url_regex -i line.

ex. acl bannedsites url_regex -i "/etc/squid/bannedsites.txt"

hope this will help!

This discussion is closed to new replies.