This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Blocking youtube ads - nice regex in UTM forum

Hi folks,

I was poking around in the UTM forum and found this nice little regex that users to stop ads in youtube videos. The creator s investigating some possible changes made which reduce the effectiveness of the block.

Here is the code -(([A-Za-z0-9.-\/]+)?)pageid\=[0-9]{1,30}

My question, where do you put things like I want to block xyzzy using regex. I have searched and tried applying the regex to various web and application policies, but regex is not accepted. The assumption as far as I can see is that everything is done with applications or web policies assuming everything you want to work on is a defined web or application and does not cover action within web pages or applications.

Does this require a feature request or am I missing something in the web and application policy areas?

 

Ian



This thread was automatically locked due to age.
Parents Reply Children
  • Hi Ian,

    The UTM supports two methods:  You need to go into a policy, then the "always block these sites" and put in regex.   Or you can go to Websites and recategorize/tag a website, and then in the policy choose what do to with the category/tag.

     

    In the XG, only the latter is supported.  There is no whitelist/blacklist directly in the policy.  Instead you create a Custom Category / URL Group object then in the policy say whether you want to allow or deny it as a whitelist/blacklist.

     

    Differences:  XG forces you to create an object and reuse it, while UTM you can put things directly in policy.  UTM supports RegEx and XG does not.  UTM has "change the category" and "tag" while the XG has "add a category" and "URL group" that do more or less the same thing.

     

    Or maybe I'm not understanding the issue.

  • Hi Micheal,

    let me try by asking for a practical example. Blocking videos in youtube requires a search within a url string, the regex does that, how do you achieve the same action the XG?

    Ian

  • Create a custom category called "Blocked videos".  Use the "keyword" field which does a substring match anywhere in the URL.  Put in the thing you want to block.  In your policy create a policy rule at the top which sets all Blocked videos to be blocked.

    The only thing is the custom category keyword is substring match, no wildcards.  The equivalent in the UTM is RegEx.  Exactly how the matches is documented in https://community.sophos.com/kb/en-us/127270

     

     

    The regex that started this all is something that looks for pageid= with certain formats anywhere in the url.  That is not possible in XG.

    But if you wanted to block: https://www.youtube.com/watch?v=dQw4w9WgXcQ

     

    You could put in
    dQw4w9WgXcQ
    /watch?v=
    /watch?v=dQw4w9WgXcQ
    www.youtube.com/watch?v=dQw4w9WgXcQ

     

    You just cannot use RegEx.