Guest User!

You are not Sophos Staff.

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

Web filtering exception based on user agent

Hi everybody,

I'd like to create an exception to bypass web filtering for all request coming from a specific network (easy) and with a specific user agent (ie : Firefox).

When trying Coming from these user agents with

.[A-Za-z0-9.-]*Firefox*  (found in a forum)

or

Firefox.*

or

.*Firefox.*

Nothing works...

Any idea ?

Thanks for your help.



This thread was automatically locked due to age.
  • Salut Renaud and welcome to the UTM Community!

    I haven't tried this, so I'm not sure what string is required for Firefox.  What do you learn from doing the following at the command line?

    grep 'ua="' /var/log/http.log|grep irefox

    Cheers - Bob

    NOTE 5 hours later: I just saw Peter-Paul's post and have marked it as the answer.

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Hello Renaud,

     

     

    please try this (have tested online with a regex tester ):

    ((?!Gecko.+)Firefox|Gecko(?!.+Firefox))(?: |\/)([\d\.apre]+)

     

    Good luck.

    Peter-Paul

     
    SFVH (SFOS 19.5.1 MR-1-Build278)  - Last (re)boot on Februari 20 2023
    Asus H410i-plus - Pentium 6605 Gold - 250GB M.2 PCIe NVMe SSD - 8GB - 3 ports
    [If any of my posts are helpful to you please use the 'Verify Answer' link]
  • Hello Peter-Paul,

    Thanks for your answer.

    It's well working with proxy configured in the browser but not in transparent mode.

    From what i've seen in http.log, ua  is empty in transparent mode. (ua="" in log)

     

    Thanks for your help.

    Regards,

    Renaud.