Answer : Blocking any domain is a module which is implemented in the squid configuration file. We just need to perform a little manual configuration as described below:
a. Create a file say ‘blacklist’ under directory ‘/etc/squid’.# touch /etc/squid/blacklist
b. Open the file ‘/etc/squid/blacklist’ with vi editor.
# vi /etc/squid/blacklist
c. Add all the domains to the file blacklist with one domain per line.
.facebook.com .twitter.com .gmail.com .yahoo.com ...
d. Save the file and exit. Now open the Squid configuration file from location ‘/etc/squid/squid.conf’.
# vi /etc/squid/squid.conf
e. Add the lines below to the Squid configuration file.
acl BLACKLIST dstdom_regex -i “/etc/squid/blacklist” http_access deny blacklist
f. Save the configuration file and exit.
Restart Squid service to make the changes effective.
# /etc/init.d/squid restart
Other squid interview questions:
- What is Squid?
- What is Proxy Server? What is the use of Proxy Server in Computer Networks?
- What is the default port of squid and how to change its operating port?
- How to block certain domains through squid proxy server in an office ?
- What is Media Range Limitation feature in squid?
- What is partial download feature in Squid?
- What is reverse proxy feature in squid?
- What is the cache store location in squid?
- What is the squid cache file format?
- How to clear cache in squid?
- How to restrict web access time in squid?
No comments:
Post a Comment
Dear visitor,
Please do not post spam. All comments will be moderated before approval.