01-27-2010 02:26 PM - edited 03-11-2019 10:02 AM
Hi All,
I have the following configuration and I was able to block the ''Farmville'' game of Facebook.
regex blockex1 "/onthefarm"
regex blockex2 "apps\.facebook\.com"
class-map type inspect http match-all block-url-class
match request uri regex blockex1
match request header host regex blockex2
policy-map type inspect http block-url-policy
parameters
class block-url-class
drop-connection log
policy-map global_policy
class inspection_default
inspect http block-url-policy
service-policy global_policy global
Now, I need to block www.facebook.com
The problem is that I cannot add another ''match request header host regex'' statement under the class, because it gives me an error.
I've tried the following regex but none of them seem to work:
regex facebook-regex "[Ff][Aa][Cc][Ee][Bb][Oo][Oo][Kk].[Cc][Oo][Mm]"
regex domain1 "\.facebook\.com"
Each time, applying the regex with the appropiate command:
class-map type inspect http match-all block-url-class
match request uri regex blockex1
no match request header host regex blockex2
match request header host regex facebook-regex
class-map type inspect http match-all block-url-class
match request uri regex blockex1
no match request header host regex blockex2
match request header host regex domain1
So, how is the appropiate way to do this?
Thank you!
Federico.
Solved! Go to Solution.
01-27-2010 07:38 PM
Wouldn't it be simpler to just block facebook.com instead of the farmville game on facebook and facebook.com?
-KS
01-27-2010 07:38 PM
Wouldn't it be simpler to just block facebook.com instead of the farmville game on facebook and facebook.com?
-KS
01-29-2010 09:05 AM
Hi,
I was able to block www.facebook.com, www.twitter.com and www.hi5.com using the following configuration:
regex domainlist1 ".*facebook.*"
regex domainlist2 ".*twitter.*"
regex domainlist3 ".*hi5.*"
class-map type regex match-any DomainBlockList
match regex domainlist1
match regex domainlist2
match regex domainlist3
class-map type inspect http match-all BlockDomainsClass
match request header host regex class DomainBlockList
policy-map type inspect http http_inspection_policy
parameters
class BlockDomainsClass
drop-connection log
policy-map global_policy
class inspection_default
inspect http http_inspection_policy
service-policy global_policy global
Thank you!
Federico.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide