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

    Controlling/Limiting web URL access via dns

    Scheduled Pinned Locked Moved DHCP and DNS
    7 Posts 3 Posters 719 Views 3 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.
    • R Offline
      RJP1267
      last edited by

      Hello
      I use PFsense (2.6.0) as the primary DNS server on my local network which means any requests go through my PFS box and then routed internally or externally. I need to restrict some local devices from accessing specific external sites (URLs) and since DNS resolves URLs to ip addresses I want to use some form of DNS filtering to enforce web site restrictions. Can someone suggest a way to do this as I have not been able to crack this nut. So the ask is real simple, code PFS box to restrict URL access to certain sites for certain devices connected to the local network. Thank you.

      S 1 Reply Last reply Reply Quote 0
      • B Offline
        BossaOps
        last edited by

        You'd probably be better off looking at blocklisting in Squid if you want to do it just on your pfsense.

        There are ways to filter it on a DNS level, plenty of services out there offer it via subscriptions (some maybe free, but read up) mostly you just forward your traffic through them, and you can use their blocklists, or make your own.

        R 1 Reply Last reply Reply Quote 0
        • R Offline
          RJP1267 @BossaOps
          last edited by

          @bossaops Thank you. Yes not interested in using external sources, want to manage the list locally. So by using squid I can say for example configure it to block youtube.com, tiktok.com, and so on? I know they have preconfigured blacklists which might be a nice addition but I want to ensure specific sites that I identify can be blocked. Just out of curiosity..how difficult would this be within squid?

          1 Reply Last reply Reply Quote 0
          • S Offline
            SteveITS Rebel Alliance @RJP1267
            last edited by

            @rjp1267 If you want to block on all PCs, you can add a Host Override in the DNS Resolver settings, to send (www.)facebook.com to 127.0.0.2 or something. You probably also need to block DNS over HTTPS since many browsers use that to bypass local DNS servers.

            Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
            When upgrading, allow 10-15 minutes to reboot, or more depending on packages, and device or disk speed.
            Upvote ๐Ÿ‘ helpful posts!

            R 1 Reply Last reply Reply Quote 0
            • R Offline
              RJP1267 @SteveITS
              last edited by

              @steveits Thanks for that suggestion, I want to apply to certain devices not all. Is squidguard.org the default site for the documentation? The current version they list 1.3 seems dated, the version I have installed is 302b7299-bf56-4d93-bf42-658712d38819-image.png

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                SteveITS Rebel Alliance @RJP1267
                last edited by

                @rjp1267 pfSense package versions are not necessarily related to software versions. Note that lists squidguard-1.4.

                Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                When upgrading, allow 10-15 minutes to reboot, or more depending on packages, and device or disk speed.
                Upvote ๐Ÿ‘ helpful posts!

                R 1 Reply Last reply Reply Quote 0
                • R Offline
                  RJP1267 @SteveITS
                  last edited by

                  @steveits Thanks for that, bit confusing how they capture the versions, I will rely on PFS to know whats most current version of the package. So would the Netgate site be the best place for the squidgard manual to configure the service?

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