<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EstiloCorreo17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=ES-DO link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hello, as the subject says im new. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Been reading a lot and some examples and i do have a weird problem where i can't block some domains. First and foremost im using the squid proxy for windows version 2.7.8 <o:p></o:p></p><p class=MsoNormal>as thats the only one for windows that works for me the 3.x versions always deny requests from clients even with the default conf. I've been testing all this in a production enviroment so ... help me!! please of i will get killed soon :D.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>my conf for 2.7.8 is(I modifying one that comes with proxy 3-1):<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>#Modified by Kyi Thar 15 March 2010<o:p></o:p></p><p class=MsoNormal>http_port 8080<o:p></o:p></p><p class=MsoNormal>cache_mgr helpdesk@ole.com.do<o:p></o:p></p><p class=MsoNormal>visible_hostname lotus.hidden<o:p></o:p></p><p class=MsoNormal>hierarchy_stoplist cgi-bin ?<o:p></o:p></p><p class=MsoNormal>cache_mem 64 MB<o:p></o:p></p><p class=MsoNormal>cache_replacement_policy heap LFUDA<o:p></o:p></p><p class=MsoNormal>cache_dir aufs c:/Squid/cache01 2000 16 256<o:p></o:p></p><p class=MsoNormal>cache_dir aufs c:/Squid/cache02 2000 16 256<o:p></o:p></p><p class=MsoNormal>cache_dir aufs c:/Squid/cache03 2000 16 256<o:p></o:p></p><p class=MsoNormal>cache_access_log c:/Squid/var/logs/access.log<o:p></o:p></p><p class=MsoNormal>cache_log c:/Squid/var/logs/cache.log<o:p></o:p></p><p class=MsoNormal>cache_store_log c:/Squid/var/logs/store.log<o:p></o:p></p><p class=MsoNormal>mime_table c:/Squid/etc/mime.conf<o:p></o:p></p><p class=MsoNormal>pid_filename c:/Squid/var/logs/squid.pid (this part here i dont know whats its use as i cant find info about it on the net)<o:p></o:p></p><p class=MsoNormal>diskd_program c:/Squid/libexec/diskd.exe<o:p></o:p></p><p class=MsoNormal>unlinkd_program c:/Squid/libexec/unlinkd.exe<o:p></o:p></p><p class=MsoNormal>logfile_daemon c:/squid/libexec/logfile-daemon.exe<o:p></o:p></p><p class=MsoNormal>forwarded_for off<o:p></o:p></p><p class=MsoNormal>via off<o:p></o:p></p><p class=MsoNormal>httpd_suppress_version_string on<o:p></o:p></p><p class=MsoNormal>uri_whitespace strip<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>maximum_object_size 524288 KB<o:p></o:p></p><p class=MsoNormal>maximum_object_size_in_memory 1024 KB<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>#redirect_program c:/usr/local/squidGuard/squidGuard.exe<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>#authenication with Windows server (commented this part as i dont want users to have to log on once more in the web pages I wasnt able to stop them from doing so and my boss didnt like the extra hassle)<o:p></o:p></p><p class=MsoNormal>#auth_param basic program c:/squid/libexec/mswin_auth.exe -O HIDDEN<o:p></o:p></p><p class=MsoNormal>#auth_param ntlm program c:/squid/libexec/mswin_ntlm_auth.exe<o:p></o:p></p><p class=MsoNormal>#auth_param ntlm children 5<o:p></o:p></p><p class=MsoNormal>#auth_param ntlm keep_alive on<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>acl all src all<o:p></o:p></p><p class=MsoNormal>acl manager proto cache_object<o:p></o:p></p><p class=MsoNormal>acl localhost src 127.0.0.1/32<o:p></o:p></p><p class=MsoNormal>acl to_localhost dst 127.0.0.0/8 0.0.0.0/32<o:p></o:p></p><p class=MsoNormal>acl localnet src 10.0.0.0/8             # RFC1918 possible internal network (some of my computers are in this range)<o:p></o:p></p><p class=MsoNormal>acl localnet src 172.16.0.0/12      # RFC1918 possible internal network (Dont use this range but i will make a DMZ for the servers with it)<o:p></o:p></p><p class=MsoNormal>acl localnet src 192.168.0.0/16   # RFC1918 possible internal network (NORMAL range for users)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>#             catch certain bugs (for example with persistent connections) and possibly<o:p></o:p></p><p class=MsoNormal>#             buffer-overflow or denial-of-service attacks.<o:p></o:p></p><p class=MsoNormal>request_header_max_size 20 KB<o:p></o:p></p><p class=MsoNormal>reply_header_max_size 20 KB<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>#Limit upload to 2M and download to 10M (trying to stop users from uploading big files to email sites and fb and download big files  as i only have 6mbps and 1mbps down/up bandwidth)<o:p></o:p></p><p class=MsoNormal>request_body_max_size 2048 KB<o:p></o:p></p><p class=MsoNormal>reply_body_max_size 10485760 deny localnet<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal># compressed (i moddief this part as instead of 0 they had 10080 and instead of 10080 they had 999999 those times are too big files could stay forever fresh! inside the cache)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>refresh_pattern -i \.gz$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.cab$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.bzip2$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.bz2$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.gz2$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.tgz$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.tar.gz$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.zip$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.rar$ 000 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.tar$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.ace$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.7z$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal># documents<o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.xls$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.doc$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.xlsx$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.docx$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.pdf$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.ppt$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.pptx$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.rtf\?$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal># multimedia<o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.mid$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.wav$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.viv$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.mpg$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.mov$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.avi$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.asf$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.qt$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.rm$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.rmvb$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.mpeg$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.wmp$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.3gp$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.mp3$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.mp4$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal># images<o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.gif$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.jpg$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.png$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.jpeg$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.bmp$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.psd$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.ad$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.gif\?$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.jpg\?$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.png\?$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.jpeg\?$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.psd\?$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal># application<o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.deb$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.rpm$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.msi$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.exe$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i \.dmg$ 0 90% 10080 <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal># default refresh patterns<o:p></o:p></p><p class=MsoNormal>refresh_pattern ^ftp: 1440 20% 0 <o:p></o:p></p><p class=MsoNormal>refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal># if a file ends before finishing sends the quick abort if those parameters comply ( i kinda forgot why i copied this from tha web )<o:p></o:p></p><p class=MsoNormal>quick_abort_min 16 KB<o:p></o:p></p><p class=MsoNormal>quick_abort_max 16 KB<o:p></o:p></p><p class=MsoNormal>quick_abort_pct 95<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>#ACL to define ports allowed to passthrough Squid<o:p></o:p></p><p class=MsoNormal>acl SSL_ports port 443<o:p></o:p></p><p class=MsoNormal>acl Safe_ports port 80                   # http<o:p></o:p></p><p class=MsoNormal>acl Safe_ports port 84                   # laboratorios cortina<o:p></o:p></p><p class=MsoNormal>acl Safe_ports port 21                   # ftp<o:p></o:p></p><p class=MsoNormal>acl Safe_ports port 443                # https<o:p></o:p></p><p class=MsoNormal>acl Safe_ports port 1025-65535 # unregistered ports<o:p></o:p></p><p class=MsoNormal>acl Safe_ports port 280                # http-mgmt<o:p></o:p></p><p class=MsoNormal>acl Safe_ports port 488                # gss-http<o:p></o:p></p><p class=MsoNormal>acl CONNECT method CONNECT<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>http_access deny manager<o:p></o:p></p><p class=MsoNormal>http_access deny !Safe_ports<o:p></o:p></p><p class=MsoNormal>http_access deny CONNECT !SSL_ports<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal># We strongly recommend the following be uncommented to protect innocent<o:p></o:p></p><p class=MsoNormal># web applications running on the proxy server who think the only<o:p></o:p></p><p class=MsoNormal># one who can access services on "localhost" is a local user<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>http_access deny to_localhost<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>#<o:p></o:p></p><p class=MsoNormal># INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS<o:p></o:p></p><p class=MsoNormal># Example rule allowing access from your local networks.<o:p></o:p></p><p class=MsoNormal># Adapt localnet in the ACL section to list your (internal) IP networks<o:p></o:p></p><p class=MsoNormal># from where browsing should be allowed<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>acl fullvideo src "c:/squid/etc/ipfullvideo.sq"  # here is a file with ips allowed to see youtube and facebook videos , media streaming <o:p></o:p></p><p class=MsoNormal>acl bad_url url_regex -i "c:/squid/etc/bad-sites.sq" # .facebook.com .twitter.com rule to block those sites for users inside ipbloqueada<o:p></o:p></p><p class=MsoNormal>acl ipbloqueada src 192.168.1.117/32 192.168.1.179/32 192.168.1.170/32 192.168.1.15/32  # ips of 3 users that shouldnt be accessing fb and twitter.<o:p></o:p></p><p class=MsoNormal>acl bad_ext urlpath_regex -i "c:/squid/etc/extensiones.sq" # rule to block some file extesions like .avi$, .mpg$ etc stop downloads from them even if they are smaller than 10MB (this doesn't WORK!)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>#Media Streams   i try to block streaming here downloaded this from your site<o:p></o:p></p><p class=MsoNormal>## MediaPlayer MMS Protocol<o:p></o:p></p><p class=MsoNormal>acl media rep_mime_type mms<o:p></o:p></p><p class=MsoNormal>acl mediapr url_regex dvrplayer mediastream ^mms://<o:p></o:p></p><p class=MsoNormal>## (Squid does not yet handle the URI as a known proto type.)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>## Active Stream Format (Windows Media Player)<o:p></o:p></p><p class=MsoNormal>acl media rep_mime_type x-ms-asf<o:p></o:p></p><p class=MsoNormal>##acl mediapr urlpath_regex \.(afx|asf)(\?.*)?$             #(regex make squid 2.7.8 to blow up had to comment them)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>## Flash Video Format<o:p></o:p></p><p class=MsoNormal>acl media rep_mime_type video/flv video/x-flv<o:p></o:p></p><p class=MsoNormal>##acl mediapr urlpath_regex \.flv(\?.*)?$                         #(regex make squid 2.7.8 to blow up had to comment them)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>## Flash General Media Scripts (Animation)<o:p></o:p></p><p class=MsoNormal>acl media rep_mime_type application/x-shockwave-flash<o:p></o:p></p><p class=MsoNormal>##acl mediapr urlpath_regex \.swf(\?.*)?$                       #(regex make squid 2.7.8 to blow up had to comment them)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>## Others currently unknown<o:p></o:p></p><p class=MsoNormal>acl media rep_mime_type ms-hdr<o:p></o:p></p><p class=MsoNormal>acl media rep_mime_type x-fcs<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal># now we do the reall blocking here<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>http_access allow localnet                                         #let the network use the proxy<o:p></o:p></p><p class=MsoNormal>http_access allow localhost                                       #let the proxy server use itself ??( O_o i dont quite get this part.)<o:p></o:p></p><p class=MsoNormal>http_access allow manager localhost<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>http_access deny bad_url ipbloqueada               #here i want all the urls in BAD_URL from the ips IPBLOQUEADA to be denied used to work ... when i started but now it doesnt i will show a sample of the file at the end<o:p></o:p></p><p class=MsoNormal>http_access deny bad_ext                                        #block reading of files with those extensions.<o:p></o:p></p><p class=MsoNormal>deny_info TCP_RESET bad_ext                                #send a tcp_reset so they dont know proxy blocked them<o:p></o:p></p><p class=MsoNormal>http_reply_access deny media !fullvideo           # here i try to deny access to media to all but those inside fullvideo (doesnt quite work either youtube loads and works :D) some other streaming are blocked well<o:p></o:p></p><p class=MsoNormal>##http_access deny mediapr<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal># And finally deny all other access to this proxy<o:p></o:p></p><p class=MsoNormal>http_access deny all<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>#always_direct allow all                                              # i feel this part is to let squidguard work, i removed it cuz it blocked youtube  and many other sites i bet that was because the ads.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>icon_directory c:/Squid/share/icons<o:p></o:p></p><p class=MsoNormal>error_directory c:/Squid/share/errors/Spanish<o:p></o:p></p><p class=MsoNormal>coredump_dir c:/Squid<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>##This is bad_sites.sq<o:p></o:p></p><p class=MsoNormal>.fanfiction.net<o:p></o:p></p><p class=MsoNormal>.meebo.com<o:p></o:p></p><p class=MsoNormal>.playboy.com<o:p></o:p></p><p class=MsoNormal>.myspace.com<o:p></o:p></p><p class=MsoNormal>.sexo.com<o:p></o:p></p><p class=MsoNormal>.facebook.com<o:p></o:p></p><p class=MsoNormal>.twitter.com<o:p></o:p></p><p class=MsoNormal>.hi5.com<o:p></o:p></p><p class=MsoNormal>plus.google.com<o:p></o:p></p><p class=MsoNormal>.identi.li<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>## this is extensiones.sq <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>.mp3$<o:p></o:p></p><p class=MsoNormal>.exe$<o:p></o:p></p><p class=MsoNormal>.com$<o:p></o:p></p><p class=MsoNormal>.bat$<o:p></o:p></p><p class=MsoNormal>.pif$<o:p></o:p></p><p class=MsoNormal>.avi$<o:p></o:p></p><p class=MsoNormal>.mpg$<o:p></o:p></p><p class=MsoNormal>.zip$<o:p></o:p></p><p class=MsoNormal>.rar$<o:p></o:p></p><p class=MsoNormal>.z7$<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>##this is ipfullvideo.sq<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>192.168.1.36<o:p></o:p></p><p class=MsoNormal>192.168.1.51<o:p></o:p></p><p class=MsoNormal>192.168.1.67<o:p></o:p></p><p class=MsoNormal>192.168.1.170<o:p></o:p></p><p class=MsoNormal>192.168.1.171<o:p></o:p></p><p class=MsoNormal>192.168.1.185<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>