The Technology Magazine.

Full width home advertisement

Android

Linux

Post Page Advertisement [Top]

Squid interview question #4: How to block certain domains through squid proxy server in an office


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:
  1. What is Squid?
  2. What is Proxy Server? What is the use of Proxy Server in Computer Networks?
  3. What is the default port of squid and how to change its operating port?
  4. How to block certain domains through squid proxy server in an office ?
  5. What is Media Range Limitation  feature in squid?
  6. What is partial download feature in Squid?
  7. What is reverse proxy feature in squid?
  8. What is the cache store location in squid?
  9. What is the squid cache file format?
  10. How to clear cache in squid?
  11. 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.

Bottom Ad [Post Page]

| Designed by Techeia.com