quick setup Squid

Posted on 2005-04-14
Last Modified: 2010-04-20
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.

Question by:hullc65203
    LVL 16

    Accepted Solution

    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
    http_access deny naughty

    #these 2 lines let your inside net get out through the proxy
    acl internal <your internal subnet>  #(ex.
    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)

    Expert Comment

    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.

    Expert Comment

    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>

    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now