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

    Question: How effective blocking extensions on PFSense?

    Scheduled Pinned Locked Moved pfSense Packages
    12 Posts 4 Posters 18.1k 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.
    • A
      afjunior
      last edited by

      I appreciate the feedback.
      I tried to create an ACL in the Squid Proxy server: General settings> Custom Options

      acl extension url_regex .exe$;http_access deny all extension;

      Another attempt: In SquidGuard> Destinations, the addition of the following regular expressions in BlackList

      ..exe|
      (download|downloads|file|files|image|picture|flash).
      .(exe|dll|wav|gif|zip|tar)|
      (..(zip|rar|cab|mp3|avi|mpg|swf|exe|mpeg|mpv|mp3))|(\ /download.|\ /. mp3)

      However I can download.

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

        Select you Destination category in the ACL or Default.

        SquidGuardDoc EN  RU Tutorial
        Localization ru_PFSense

        1 Reply Last reply Reply Quote 0
        • A
          afjunior
          last edited by

          Thank you all for your help
          I had tried several solutions.
          I made a new destination in SquidGuard with the regular expression .exe
          And Proxy filter SquidGuard: Default> Destination rules deny that I configured as destination
          Uncheck the box to enable Proxy filter SquidGuard: General Settings, Apply, Save.
          I marked the box, apply, save.
          And even reboot the server.

          After that, it worked perfectly
          Happy New Year

          1 Reply Last reply Reply Quote 0
          • ?
            Guest
            last edited by

            If your regular expression is just the bare word "exe" you're going to run into a ton of overblocking.

            1 Reply Last reply Reply Quote 0
            • A
              afjunior
              last edited by

              Sorry I wrote wrong.
              Should be ".exe"
              The correct phrase above

              1 Reply Last reply Reply Quote 0
              • ?
                Guest
                last edited by

                You definitely want to research how regular expressions work.  .exe will not block what you think it will.

                1 Reply Last reply Reply Quote 0
                • A
                  afjunior
                  last edited by

                  But ".*.exe" or ".exe" worked.
                  If it's wrong, what is the correct way to block downloads .exe?

                  1 Reply Last reply Reply Quote 0
                  • ?
                    Guest
                    last edited by

                    This will probably help clarify:

                    http://www.squidguard.org/Doc/expressionlist.html

                    .exe will overblock as the . is treated as a wild card.  Using \ will escape it so .exe will be a more correct approach.  Mind you, .exe isn't the only executable file extension:

                    http://antivirus.about.com/od/securitytips/a/fileextview.htm

                    1 Reply Last reply Reply Quote 0
                    • jimpJ
                      jimp Rebel Alliance Developer Netgate
                      last edited by

                      Not to mention that without being properly anchored as .exe$, it would match .exe in the middle of any URL

                      So if some random page was formatted like www.somerandomnewssite.com/story/embezzling.executive.gets.giant.bonus that would also get blocked.

                      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                      Need help fast? Netgate Global Support!

                      Do not Chat/PM for help!

                      1 Reply Last reply Reply Quote 0
                      • A
                        afjunior
                        last edited by

                        Very important these ideas. But this is a challenge we will face.
                        For you what is the best way to block those extensions on pfsense?

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