<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Configure squid proxy to block some sites in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/configure-squid-proxy-to-block-some-sites/m-p/5268064#M81295</link>
    <description>solved by using some other setup</description>
    <pubDate>Tue, 19 Apr 2011 12:48:04 GMT</pubDate>
    <dc:creator>gnana prakasam</dc:creator>
    <dc:date>2011-04-19T12:48:04Z</dc:date>
    <item>
      <title>Configure squid proxy to block some sites</title>
      <link>https://community.hpe.com/t5/operating-system-linux/configure-squid-proxy-to-block-some-sites/m-p/5268062#M81293</link>
      <description>Dear all,&lt;BR /&gt;    i just wanted to block some sites through my proxy server.i am using red hat linux 5.0 and squid proxy version 3.0. attached the configuration file also.tried through acl file but not success. can anybody suggest what went wrong on this config file?&lt;BR /&gt;thanks in advance</description>
      <pubDate>Sat, 01 Jan 2011 13:24:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/configure-squid-proxy-to-block-some-sites/m-p/5268062#M81293</guid>
      <dc:creator>gnana prakasam</dc:creator>
      <dc:date>2011-01-01T13:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Configure squid proxy to block some sites</title>
      <link>https://community.hpe.com/t5/operating-system-linux/configure-squid-proxy-to-block-some-sites/m-p/5268063#M81294</link>
      <description>Your configuration file syntax looks OK to me.&lt;BR /&gt;&lt;BR /&gt;The problem is probably in the ordering of the rules: according to squid documentation, squid processes the access list rules (= the http_access lines) in order, and when the first rule that matches the request is found, it stops processing the rules and does what the matching rule said.&lt;BR /&gt;&lt;BR /&gt;Because the default squid.conf file contains a lot of comments, it is sometimes useful to filter out everything else and look only at the important lines:&lt;BR /&gt;&lt;BR /&gt;$ grep '^[^#]*http_access' squid.conf | less&lt;BR /&gt;&lt;BR /&gt;This command shows only those lines which contain the word "http_access" and are *not* commented out.&lt;BR /&gt;&lt;BR /&gt;From your file, this command produces this output:&lt;BR /&gt;&lt;BR /&gt;http_access deny kgpsites&lt;BR /&gt;http_access allow intra&lt;BR /&gt;http_access deny kgpsites&lt;BR /&gt;http_access allow manager localhost&lt;BR /&gt;http_access deny manager&lt;BR /&gt;http_access deny blockeddomain&lt;BR /&gt;http_access deny !Safe_ports&lt;BR /&gt;http_access deny CONNECT !SSL_ports&lt;BR /&gt;http_access allow localhost&lt;BR /&gt;http_access deny all&lt;BR /&gt;http_access deny blockeddomain&lt;BR /&gt;&lt;BR /&gt;You have "http_access deny kgpsites" and "http_access deny blockeddomain" listed twice: in both cases, the second line is non-functional and can be removed.&lt;BR /&gt;&lt;BR /&gt;Your first "http_access deny kgpsites" works, because it is located before "http_access allow intra". This first kgpsites line is located immediately after the "acl kgpsites" line, away from the other http_access lines, so you probably didn't realize it's there. &lt;BR /&gt;&lt;BR /&gt;Before squid gets to the first "http_access deny blockeddomain", it sees "http_access allow intra" and thinks: "OK! This access is allowed. I can stop reading the rules for this request."&lt;BR /&gt;&lt;BR /&gt;For the same reason, the second "http_access deny kgpsites" is non-functional.&lt;BR /&gt;&lt;BR /&gt;The second-to-last line is "http_access deny all": it matches everything, so the last line "http_access deny blockeddomain" is never reached. So that line is useless.&lt;BR /&gt;&lt;BR /&gt;If adjusting ordering of your access list rules doesn't solve the problem, please try this:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://wiki.squid-cache.org/SquidFaq/SquidAcl#I_set_up_my_access_controls.2C_but_they_don.27t_work.21__why.3F" target="_blank"&gt;http://wiki.squid-cache.org/SquidFaq/SquidAcl#I_set_up_my_access_controls.2C_but_they_don.27t_work.21__why.3F&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Sat, 01 Jan 2011 16:20:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/configure-squid-proxy-to-block-some-sites/m-p/5268063#M81294</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2011-01-01T16:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Configure squid proxy to block some sites</title>
      <link>https://community.hpe.com/t5/operating-system-linux/configure-squid-proxy-to-block-some-sites/m-p/5268064#M81295</link>
      <description>solved by using some other setup</description>
      <pubDate>Tue, 19 Apr 2011 12:48:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/configure-squid-proxy-to-block-some-sites/m-p/5268064#M81295</guid>
      <dc:creator>gnana prakasam</dc:creator>
      <dc:date>2011-04-19T12:48:04Z</dc:date>
    </item>
  </channel>
</rss>

