Reputation: 333
I am using squid server in my Debian server, I want to block some websites in my system and I followed all the procedures for this but there is no result.
Upvotes: 23
Views: 84257
Reputation: 1
search in squid.cong the line "acl CONNECT method CONNECT" after it insert the acl that you would like to block for exemple i would like to block facebook so :
acl FACEBOOK url_regex -i *.facebook.com*
the url_regex will help to block any url that contain facebook.com now search the line
"# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS" in squid config insert after it http_access deny <the_name_you_gave_to_your_act> in our exemple
http_access deny FACEBOOK
Upvotes: 0
Reputation: 9
Instead of Using all this Just go to the terminal press (window-button+T) then type
sudo gedit /etc/hosts
then select your ip address and write the name of the site you want to block
127.0.0.1 localhost blockme.example.com
this will route all requests to that domain to your IP address instead
Upvotes: 0
Reputation: 404
You have to do some changes in squid.conf and here are the steps:
open this file /etc/squid3/squid.conf
add these lines:
acl bad_url dstdomain "/etc/squid3/bad-sites.acl"
http_access deny bad_url
then go to /etc/squid3/bad-sites.acl and add domains with this format
.google.com
.msn.com
.app.facebook.com
Upvotes: 33
Reputation: 101
You can also do by following changes in squid.conf
acl toblock dstdomain .facebook.com .google.com
http_access deny toblock
Upvotes: 10