Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    Squidguard + Whitelist + regex

    Scheduled Pinned Locked Moved pfSense Packages
    3 Posts 2 Posters 3.2k Views 1 Watching
    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

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
          Privacy Policy · Cookie Policy