Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Squidguard + Whitelist + regex

    pfSense Packages
    2
    3
    2.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      titus91360
      last edited by

      Hello all,
      I'm trying to configure a new ACL on Squidguard in order to whitelist some domains and sub-domains.
      So, I created a target to manage my website list. I noticed that "domain list" didn't handle subdomain.
      For example, I need to allow *.onmicrosoft.com. Sub-domains (like test.onmicrosoft.com or example.onmicrosoft.com) have different ip each other.

      So I think I need to use regex for that purpose. But I didn't manage to create the good expression list.

      Is someone could help me ?

      Here are some example a subdomain sites that I would like to authorise :
      *.onmicrosoft.com
      *.microsoftonline.com
      *.office365.com
      *.office.com

      Thanks in advance

      1 Reply Last reply Reply Quote 0
      • C
        CZvacko
        last edited by

        Hello, I'm answering an old question and asking for a different solution:
        The only way to use wildcards in SquidGuard is to use regex ? Isn't there a simpler way ? I ended up using regex like this

        (\S*office365\.com)(\/\S*)?|(\S*office\.com)(\/\S*)?
        
        C 1 Reply Last reply Reply Quote 0
        • C
          CZvacko @CZvacko
          last edited by

          @CZvacko said in Squidguard + Whitelist + regex:

          use regex

          since 2.7.2 above regex stopped work, now I use below

          (.*office365\.com.*)|(.*office\.com.*)
          

          It can also match a url like below, it doesn't bother me too much, someone can improve my regex...
          HACKoffice365.com
          office365.comHACK

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.