Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Question [SOLVED] Blocking Sites with SQUID Proxy

    I need to block some of my sites with SQUID Proxy. I added following lines to my SQUID configuration file but still the site remains unblocked.How to block it?

    acl blocksites url_regex yahoo
    http_access deny blocksites

    I have also tried saving some url & filter content in a file and edited configuration as follows,

    acl blocksites url_regex "/etc/squid/squid-block.acl"
    http_access deny blocksites

    The squid-block.acl file contents are,

    Please help me to block the sites !

  2. #2
    Linux Newbie
    Join Date
    Aug 2009
    Mumbai, India

    The ACL's take effect in the sequence they are parsed when squid starts. I mean, if it gets a generic allow rule prior to the deny rule, the deny does not take effect.

    Ideally, in squid, an acl is configured for the local network access and this is called via the syntax
    http_access allow <name_of_acl>
    In your case when trying to effect the blocking of sites listed in squid-block.acl you need to ensure that your deny rule viz.
    http_access deny blocksites
    is entered prior to the generic allow rule ( or any other allow rule )

    This should ideally put your config on track


  3. #3
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Western Kentucky
    if you are planning to do some wide-area blocking, i'd recommend squidguard.

    linux user # 503963

  4. $spacer_open
  5. #4
    Just Joined!
    Join Date
    Aug 2009
    Evil Empire
    Quote Originally Posted by scathefire View Post
    if you are planning to do some wide-area blocking, i'd recommend squidguard.
    It's too hard for my FreeBSD server

  6. #5


    Thank you so much! Its working now!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts