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

    SquidGuard block partial URL String?

    Scheduled Pinned Locked Moved pfSense Packages
    6 Posts 2 Posters 4.8k Views
    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.
    • D
      DLeVasseur
      last edited by

      PFSense 1.23 trying to use SquidGuard to block www.facebook.com/login.php  I can't seem to get regex to work, always says "DEST {blocksite} is not a valid URL".  The regex that should work is 'www.facebook.com/login'

      I have also tried:  www.facebook.com/login* www.facebook.com/login.*

      Just to be sure I've also tried other sites and I can't get a string to block unless it is exact.

      Any ideas?  Is there a place where I can manually add the above block?

      1 Reply Last reply Reply Quote 0
      • N
        Nachtfalke
        last edited by

        Did you try with

        .*facebook\.com/.*
        
        1 Reply Last reply Reply Quote 0
        • D
          DLeVasseur
          last edited by

          If I use any regex operators it comes up with invalid URL.

          So…  I was overthinking it.  Turns out anything I put in there gets blocked.  To check this i added {mysite.com}/c and it blocked all of the subfolders for my site that started with c.  So it seems I do not need to have any regex characters.

          Unfortunately this doesn't solve my facebook issue.  I added www.facebook.com/log and that blocked the LOGOUT page but not the login page.  Facebook is so entrenched in everything that I want the site to be available (links from various sources, etc...) but I don't want my users to be able to login.  Sigh...  Maybe it is impossible.

          1 Reply Last reply Reply Quote 0
          • D
            DLeVasseur
            last edited by

            Didn't realize the facebook login page is HTTPS….  That's why I can't block it.  :(  Ohh well.  Out goes the whole site.

            1 Reply Last reply Reply Quote 0
            • N
              Nachtfalke
              last edited by

              But I think only the login page is httpS and the other sites are normal http.
              If you block all http traffic for facebook it would make sense for the clients to login if they cann't browse the site ?!

              Or you have to disable the transparent mode in squid and hardcode the proxy in the browser or you use WPAD to autoconfigure the browser.

              1 Reply Last reply Reply Quote 0
              • D
                DLeVasseur
                last edited by

                I guess I could block the home.php landing page, but I think I tried that and it also didn't work.

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