Find the answer to your Linux question:
Results 1 to 5 of 5
Like Tree1Likes
  • 1 Post By syd05
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2010
    Posts
    5

    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,
    .cricinfo.com
    mp3

    Please help me to block the sites !

  2. #2
    Just Joined!
    Join Date
    Aug 2009
    Location
    Mumbai, India
    Posts
    96
    Hi,

    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
    Code:
    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.
    Code:
    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

    --Syd
    ramspick likes this.

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

    SquidGuard
    linux user # 503963

  4. $spacer_open
    $spacer_close
  5. #4
    mzv
    mzv is offline
    Just Joined!
    Join Date
    Aug 2009
    Location
    Evil Empire
    Posts
    33
    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
    Just Joined!
    Join Date
    Jan 2010
    Posts
    5

    Working

    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
  •