[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 187
  • Last Modified:

quick setup Squid

Is there a simple way to set up Squid? I've been reading the config manuals and my eyes are starting to bleed.

I don't need it to cache anything, all I need it to do is filter out specific web sites.

Thanks
0
hullc65203
Asked:
hullc65203
  • 2
1 Solution
 
JammyPakCommented:
yes, it's pretty simple...

-install squid
- execute 'squid -z' to build the directories
- edit squid.conf

you need to add acls:

#these 2 lines block a website
acl naughty dstdoman .playboy.com
http_access deny naughty

#these 2 lines let your inside net get out through the proxy
acl internal <your internal subnet>  #(ex. 192.168.1.0/24)
http_access allow internal

you need to put the deny ahead of the allow in the conf file, otherwise the allow will take precedent.

Next, start the squid service, and modify the users browsers to use the proxy and port 3128 (that's the default, you can change it in the squid.conf file)
0
 
bzImage8Commented:
A better way to block sites is squidGuard, i has a database of more than 500,000 porn domains and URLS, is not easy to setup if you are a begginer but is the best way to do what you want to do.

http://squidguard.org
0
 
bzImage8Commented:
also, you will need to redirect the http traffic to your squid box, if your squid box is the same as your gateway you can try:

iptables -t nat -A PREROUTING -p tcp --dport 80 -s <your network> -j REDIRECT --
to <your squid port>
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now