Tuesday, January 13, 2009

how to block the actually versions of MSN Messenger, ICQ, Yahoo Messenger using the squid proxy

# Block messenger logins
acl msnlogin dstdomain nexus.passport.com
http_access deny msnlogin
deny_info TCP_RESET msnlogin

# Block MSN Messenger
acl msnmessenger url_regex -i gateway.dll
http_access deny msnmessenger

# Block MSN online chat
acl msnchathttp url_regex -i ^http://chat\.
acl msnchathttp url_regex -i ^http://.*chat.*
http_access deny msnchathttp

# Blocking Adware
acl adware url_regex -i ^http://.*lzio\.com.*
http_access deny adware
http_reply_access deny adware


# Block messenger web sites
acl msnoverhttp url_regex -i e-messenger
acl msnoverhttp url_regex -i ^http://.*messenger.*\.com
acl msnoverhttp url_regex -i ^http://.*messenger.*\.ca
acl msnoverhttp url_regex -i ^http://.*messenger.*\.us
acl msnoverhttp url_regex -i ^http://.*messenger.*\.info
acl msnoverhttp url_regex -i ^http://.*messenger.*\.cn
acl msnoverhttp url_regex -i ^http://.*messenger.*\.org
acl msnoverhttp url_regex -i ^http://.*messenger.*\.net
acl msnoverhttp url_regex -i ^http://.*messenger.*\.biz
acl msnoverhttp url_regex -i ^http://.*messenger.*\.fi
acl msnoverhttp url_regex ^http://.*msg.*\.com
acl msnoverhttp url_regex ^http://.*msg.*\.ca
acl msnoverhttp url_regex ^http://.*msg.*\.us
acl msnoverhttp url_regex ^http://.*msg.*\.info
acl msnoverhttp url_regex ^http://.*msg.*\.cn
acl msnoverhttp url_regex ^http://.*msg.*\.org
acl msnoverhttp url_regex ^http://.*msg.*\.net
acl msnoverhttp url_regex ^http://.*msg.*\.biz
acl msnoverhttp url_regex ^http://.*msg.*\.fr
acl msnoverhttp url_regex -i ^http://.*\.AIM.*
acl msnoverhttp url_regex -i ^http://.*AIM\..*
acl msnoverhttp url_regex -i ^http://.*wbmsn.*\.com
acl msnoverhttp url_regex -i ^http://.*wbmsn.*\.ca
acl msnoverhttp url_regex -i ^http://.*wbmsn.*\.us
acl msnoverhttp url_regex -i ^http://.*wbmsn.*\.info
acl msnoverhttp url_regex -i ^http://.*wbmsn.*\.cn
acl msnoverhttp url_regex -i ^http://.*wbmsn.*\.org
acl msnoverhttp url_regex -i ^http://.*wbmsn.*\.net
acl msnoverhttp url_regex -i ^http://.*wbmsn.*\.biz
acl msnoverhttp url_regex -i ^http://.*wbmsn.*\.fr
acl msnoverhttp url_regex ^http://64\.12\.163\.136
http_access deny msnoverhttp

# AIM / MSN domains
acl baddomains dstdom_regex -i .*\.blue\.aol\.com
acl baddomains dstdom_regex -i .*\.icq\.com
http_access deny baddomains

# Downloads
acl download rep_mime_type ^.*video.*
acl download rep_mime_type ^.*audio.*
http_reply_access deny download

# Block AOL and YAHOO
acl aolyahoo dstdomain login.oscar.aol.com
acl aolyahoo dstdomain pager.yahoo.com
acl aolyahoo dstdomain shttp.msg.yahoo.com
acl aolyahoo dstdomain update.messenger.yahoo.com
acl aolyahoo dstdomain update.pager.yahoo.com
http_access deny aolyahoo

# Mime blocking
# Blocking reqested mine types
acl mimeblockq req_mime_type ^application/x-msn-messenger$
acl mimeblockq req_mime_type ^app/x-hotbar-xip20$
acl mimeblockq req_mime_type ^application/x-icq$
acl mimeblockq req_mime_type ^.*AIM.*
acl mimeblockq req_mime_type ^application/x-comet-log$
acl mimeblockq req_mime_type ^application/x-pncmd$

# Blocking sent mime types
acl mimeblockp rep_mime_type ^application/x-msn-messenger$
acl mimeblockp rep_mime_type ^app/x-hotbar-xip20$
acl mimeblockp rep_mime_type ^application/x-icq$
acl mimeblockp rep_mime_type ^.*AIM.*
acl mimeblockp rep_mime_type ^.*AIM/HTTP
acl mimeblockp rep_mime_type ^application/x-comet-log$
acl mimeblockp rep_mime_type ^application/x-pncmd$
acl mimeblockp rep_mime_type ^application/x-chaincast$

# Setting Access controls
http_access deny mimeblockq
http_reply_access deny mimeblockp

# Streaming players
acl useragent browser -i ^.*NSPlayer.*
acl useragent browser -i ^.*player.*
acl useragent browser -i ^.*Windows-Media-Player.*
http_access deny useragent
Read More..