Squid Block any Domain Name Accessing the Internet
Q. How do I block any website accessing the Internet using squid proxy server?
A. You can simply use squid ACL to block access to any web site. There are 3 steps:
#1. Create a text file with blocked domain name list such as baddomain1.com, mail.yahoo.com, gmail.com and so on
#2. Define Acl
#3. Restart squid
First, create a file called /etc/squid/blocked.domains.acl
# vi /etc/squid/blocked.domains.acl
Append domain names,
gmail.com
baddomain.com
sex.com
mail.yahoo.com
Save and close the file. Open squid.conf file:
# vi /etc/squid/squid.conf
Create acl called blockeddomain:
acl blockeddomain dstdomain "/etc/squid/blocked.domains.acl"
Deny http access, enter:
http_access deny blockeddomain
Close and save the file. Restart squid proxy server:
# /etc/init.d/squid restart
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Linux / UNIX FAQ:
- Squid deny users accessing a website
- Squid proxy How to filter or block a particular port
- Squid proxy authentication in transparent mode
- How to: Linux / UNIX setup Squid Proxy authentication
- How To Use Proxy Server To Access Internet at Shell Prompt With http_proxy Variable
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Please do not use the comment form to ask for help / question. Ask your question on the excellent Linux tech support forum. Thank you very much for stopping by our site!
Tags: acl, proxy server, squid, squid block domain, squid block domain acl, squid block mail service, squid block sites, squid block url, squid block websites, squid cache, squid configuration, squid howto, squid linux, squid proxy, squid proxy server ~ Last updated on: February 6, 2008



Recent Comments
Today ~ 3 Comments
Today ~ 19 Comments
Today ~ 2 Comments
Today ~ 37 Comments
Today ~ 46 Comments