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

Can't get pfBlockerNG to block pornhub.com

pfBlockerNG
13
56
21.8k
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.
  • M
    michmoor LAYER 8 Rebel Alliance @1OF1000Quadrillion
    last edited by Mar 24, 2022, 10:05 PM

    @1of1000quadrillion said in Can't get pfBlockerNG to block pornhub.com:

    AS29789

    ASN blocking is dangerous. Unless its an ASN wholly owned by the public entity (facebook,google,nextlix) then you are just blackholing lots of sites. Blast radius is way to much with that technique.

    Firewall: NetGate,Palo Alto-VM,Juniper SRX
    Routing: Juniper, Arista, Cisco
    Switching: Juniper, Arista, Cisco
    Wireless: Unifi, Aruba IAP
    JNCIP,CCNP Enterprise

    N 1 Reply Last reply Mar 25, 2022, 4:58 AM Reply Quote 0
    • N
      noplan @michmoor
      last edited by Mar 25, 2022, 4:58 AM

      @michmoor

      OH yeah we burned some serious amount of hours playing and undoing this dangerous Config

      Yeep nat reflection also on the default start / setting here
      Next on the list the list from @NOCling

      1 Reply Last reply Reply Quote 0
      • A
        axsdenied @fullauto
        last edited by Mar 25, 2022, 2:33 PM

        @fullauto I suspect a DNS leak. I've seen this behavior as I didn't lock DNS to my specific server.

        If you're using Windows with Edge, Edge actually has a feature that was allowing it to resolve URL's that shouldn't have worked, based on my DNS config. I.e. they resolved fine in command line (no flush needed) but not in Edge.

        1 Reply Last reply Reply Quote 0
        • J
          JonathanLee @fullauto
          last edited by JonathanLee Mar 25, 2022, 2:49 PM Mar 25, 2022, 2:42 PM

          @fullauto

          Have you tried regular expressions for the URL?

          login-to-view

          (Image: Most of my blocks are for learning purposes and for my research with my degree)

          I don't like prankdial, hotjar, rubygems, docker, and some other ones that seemed to cause me some issues. I am sure a lot of mine do not need to be blocked, but how can you learn if you don't test stuff out? Here is an example.

          I always have had issues with Doubleclick.net they caused me so many issues with devices and human interaction with mouse and keyboards, I found all my items work better with them blocked. Notice ^.URL.com.$ try that.

          Also check your Target rules if they are whitelisted it will override items by order like ACLs.

          login-to-view

          Also enable encrypted DNS

          login-to-view

          If the DNS is encrypted and using SSL it can't be hijacked, I would cry if they hijacked the update servers.

          Make sure to upvote

          J 1 Reply Last reply Mar 25, 2022, 2:52 PM Reply Quote 0
          • J
            JonathanLee @JonathanLee
            last edited by JonathanLee Mar 25, 2022, 2:53 PM Mar 25, 2022, 2:52 PM

            @jonathanlee

            login-to-view

            You can see it blocking all the variations of doubleclick.net now, it does not matter what differences are in the URL if the main part is the same it blocks it forever.

            Make sure to upvote

            1 Reply Last reply Reply Quote 0
            • L
              LPD7
              last edited by Jun 2, 2022, 11:46 AM

              I have read through this thread but still unclear as to what the resolution would be. I too would like to block sites such as facebook, tik-tok, etc and thought I had it licked by creating a custom list in DNSBL but the sites are not getting blocked. I have squid installed but not running as I had some issues in the past where it locked up the system which I think were related to bad memory which I have resolved. I am new to this and still getting my feet wet so would like to get clarity on how to accomplish this. I am sure this has been talked about quite a bit so if there is a thread or instruction that covers the topic feel free to post the link and I will give it a shot. Thank you.

              Intelligence is not a substitute for common sense.
              Intel i5-3427 * 1.80GHz * 8GB Memory * 100GB HDD
              Putting legacy equipment into service and out of landfills.

              S 1 Reply Last reply Jun 2, 2022, 2:03 PM Reply Quote 1
              • S
                SteveITS Galactic Empire @LPD7
                last edited by Jun 2, 2022, 2:03 PM

                @lpd7 Can you provide details? nslookup results, etc. Are you blocking DoH? If not most browsers will bypass the configured DNS servers. Did you run an update in pfBlocker after changing settings?

                Pre-2.7.2/23.09: 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 restart, or more depending on packages and device speed.
                Upvote 👍 helpful posts!

                L 1 Reply Last reply Jun 2, 2022, 7:45 PM Reply Quote 0
                • L
                  LPD7 @SteveITS
                  last edited by Jun 2, 2022, 7:45 PM

                  @steveits said in Can't get pfBlockerNG to block pornhub.com:

                  @lpd7 Can you provide details? nslookup results, etc. Are you blocking DoH? If not most browsers will bypass the configured DNS servers. Did you run an update in pfBlocker after changing settings?

                  New to pFS and pFB so bear with me as I track down the info and educate myself as well.

                  Not sure which nslookup results you want to see so please elaborate, happy to provide.

                  Yes blocking DoH
                  login-to-view

                  and selected all options in the blocking list
                  login-to-view

                  I usually run Cron after making changes but ran the Update twice just to make sure.

                  Intelligence is not a substitute for common sense.
                  Intel i5-3427 * 1.80GHz * 8GB Memory * 100GB HDD
                  Putting legacy equipment into service and out of landfills.

                  J S 3 Replies Last reply Jun 2, 2022, 8:20 PM Reply Quote 0
                  • J
                    JonathanLee @LPD7
                    last edited by JonathanLee Jun 2, 2022, 8:27 PM Jun 2, 2022, 8:20 PM

                    @lpd7

                    I don't know if this helps, I use Squidguard as it is designed for use with Squid Proxy. Here is some photos of it in action.

                    I feel this system should be simplified for parents and have scripts created to make this install with ease. You must have static addresses to make this work correctly. So it should have a quick install where you manually connect each device so it can auto populate the static addresses.

                    After it should create your certificates for you and let you install them.

                    After it should walk you threw how to set up WPAD this is a must for auto proxy use.

                    https://docs.netgate.com/pfsense/en/latest/recipes/http-client-proxy-wpad.html

                    login-to-view

                    Just edit a path to the file and save it. This is needed for use with windows and other devices to find the proxy automatically.

                    Next you need your websites you want blocked. Example of how it works for me.

                    login-to-view

                    (Image: Url Blocker working under Squidguard Table)

                    login-to-view

                    (Image: Once package is installed use SquidGuard Proxy Filter)

                    login-to-view

                    (Image: What happens when the URL is tested)

                    login-to-view

                    (Image: Target Categories)

                    login-to-view

                    (Make a Profile and attach the IP addresses of the system you want blocked for adult websites, you must also have a dummy profile for it to work that takes the place of position one)

                    A nice how to guide I have found to get this system to work.

                    Configure pfSense as HTTPS \ SSL Proxy filter using Squid and SquidGuard! (n.d.). Retrieved June 2, 2022, from https://forum.it-monkey.net/index.php?topic=23.0

                    Make sure you let the loopback and local subnets use the proxy

                    login-to-view

                    This all works with the HTTP get requests and headers. So no harm done. It is so simple however I worked in IT for over 15 combined years. Yes this needs to be simple for the average Parent and it can be done. There is some great guides for this version, and I for one use it and it blocks what you want blocked. You can even set up timers for no access in the middle of the night.

                    Do not forget you must set up your access control lists. This is the packet filter that uses ports and IP addresses also.

                    This is mine.

                    login-to-view

                    login-to-view
                    (image: ACLS)

                    login-to-view
                    (image: NAT Port Forwards for DNS and NTP so the firewall handles all requests)

                    Make sure to upvote

                    1 Reply Last reply Reply Quote 0
                    • S
                      SteveITS Galactic Empire @LPD7
                      last edited by Jun 2, 2022, 8:24 PM

                      @lpd7 re: nslookup...

                      nslookup pornhub.com pfsense_lan_ip

                      Do you get the real IP there?

                      Pre-2.7.2/23.09: 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 restart, or more depending on packages and device speed.
                      Upvote 👍 helpful posts!

                      L 1 Reply Last reply Jun 2, 2022, 8:38 PM Reply Quote 0
                      • J
                        JonathanLee @LPD7
                        last edited by Jun 2, 2022, 8:30 PM

                        @lpd7

                        This is a great website it has everything for you and is pretty clear just follow the steps.

                        Configure pfSense as HTTPS \ SSL Proxy filter using Squid and SquidGuard! (n.d.). Retrieved June 2, 2022, from https://forum.it-monkey.net/index.php?topic=23.0

                        Make sure to upvote

                        L 1 Reply Last reply Jun 2, 2022, 8:40 PM Reply Quote 0
                        • L
                          LPD7 @SteveITS
                          last edited by Jun 2, 2022, 8:38 PM

                          @steveits The ip for the server was the loopback for the pFS box, is this what you should see?

                          login-to-view

                          Intelligence is not a substitute for common sense.
                          Intel i5-3427 * 1.80GHz * 8GB Memory * 100GB HDD
                          Putting legacy equipment into service and out of landfills.

                          S 1 Reply Last reply Jun 2, 2022, 9:05 PM Reply Quote 0
                          • L
                            LPD7 @JonathanLee
                            last edited by Jun 2, 2022, 8:40 PM

                            @jonathanlee Wow great info, much appreciated for the effort. I am going to look this over and see if I cant get it working. Thanks again.

                            Intelligence is not a substitute for common sense.
                            Intel i5-3427 * 1.80GHz * 8GB Memory * 100GB HDD
                            Putting legacy equipment into service and out of landfills.

                            J 1 Reply Last reply Jun 2, 2022, 8:47 PM Reply Quote 1
                            • J
                              JonathanLee @LPD7
                              last edited by JonathanLee Jun 2, 2022, 8:52 PM Jun 2, 2022, 8:47 PM

                              @lpd7

                              No problem that pfSense configuration website I sent is my favorite.

                              I tested my firewalls DNS, it will still see that address however, it is blocked on the USER side from accessing it on any browser that is included in the Squidguard blocks USER configured IP addresses to static MAC mappings.

                              login-to-view

                              (Image: Firewall Sees the IP address)

                              login-to-view
                              (Image: End users can not get to it)

                              Keep in mind this is SSL based if I use a HTTP request I have a custom webpage.

                              login-to-view
                              (Image: HTTP site blocked)

                              One more detail you must also block out the IP addresses in the URL to make this fully work this way no one can use dig or use nslookup and grab that IP and plug it in and access the site still. Also block major network atomizers that bypass proxies online.

                              login-to-view

                              (Image: IP block for URL access)

                              Make sure to upvote

                              1 Reply Last reply Reply Quote 0
                              • S
                                SteveITS Galactic Empire @LPD7
                                last edited by Jun 2, 2022, 9:05 PM

                                @lpd7 said in Can't get pfBlockerNG to block pornhub.com:

                                ip for the server was the loopback for the pFS box

                                ...which means it's working. :) Ensure your PC isn't caching the old DNS...in Windows run "ipconfig /flushdns" to empty the cache, and close your browser.

                                Pre-2.7.2/23.09: 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 restart, or more depending on packages and device speed.
                                Upvote 👍 helpful posts!

                                1 Reply Last reply Reply Quote 1
                                • L
                                  LPD7
                                  last edited by Jun 29, 2022, 7:09 PM

                                  @jonathanlee I have been looking over the instructions both from what you provided and from the link that goes step by step all of which is good stuff.

                                  I attempted to start working on it but pulled back as I dont want to foul up my active box and am waiting for a new case so I can get a second box up and running which is what I will use for this build. The question that I have is about vlans....are they a necessity and if so can I use the LAN interface for that purpose?

                                  My setup is configured with the WAN coming into one port on the FW and the LAN going out another port to a managed switch which connects various APs and other non managed switches and hard wired computers.

                                  The instructions in the link (https://forum.it-monkey.net/index.php?topic=23.0) doesnt seem to mention vlans so just want to verify this can be done without the use of vlans.

                                  I know what vlans are but have no experience with them so am trying to keep a handle on the learning curve, once I master one function then move onto another.

                                  Once I get the other box up and running (hopefully by july 4 weekend) I will use that in isolation with a single pc to test the rules/blocking once it all seems to be working I will do the switch over.

                                  Thank you.

                                  Intelligence is not a substitute for common sense.
                                  Intel i5-3427 * 1.80GHz * 8GB Memory * 100GB HDD
                                  Putting legacy equipment into service and out of landfills.

                                  M J 2 Replies Last reply Jun 29, 2022, 7:29 PM Reply Quote 0
                                  • M
                                    michmoor LAYER 8 Rebel Alliance @LPD7
                                    last edited by Jun 29, 2022, 7:29 PM

                                    @lpd7 If you are using the pfsense as a dns resolver cant you also just set up a host override pointing to 127.0.0.1 ?
                                    That blocks it for sure.

                                    Firewall: NetGate,Palo Alto-VM,Juniper SRX
                                    Routing: Juniper, Arista, Cisco
                                    Switching: Juniper, Arista, Cisco
                                    Wireless: Unifi, Aruba IAP
                                    JNCIP,CCNP Enterprise

                                    L 1 Reply Last reply Jun 30, 2022, 11:53 PM Reply Quote 0
                                    • L
                                      LPD7 @michmoor
                                      last edited by LPD7 Jul 1, 2022, 12:01 AM Jun 30, 2022, 11:53 PM

                                      @michmoor I am using dns resolver but am unfamiliar with the remedy you suggest. Based on what I have seen and been told it appears the resolution is a bit more in depth but I can be wrong as there seems to be many schools of thought on this topic.

                                      So to restate:
                                      I want to control/limit access by local devices/clients to web sites of my choosing. I do not want to have to configure each device individually but rather have the FW do the work. This is particularly important for those web sites whose URLs are encrypted (DoT, DoH).

                                      So would the solution proposed by jonathanlee within this thread be the correct path and if so I have a question about vlans.

                                      or

                                      Are the instructions listed at https://forum.it-monkey.net/index.php?topic=23.0 the solution I am seeking.

                                      Appreciate the feedback.

                                      Intelligence is not a substitute for common sense.
                                      Intel i5-3427 * 1.80GHz * 8GB Memory * 100GB HDD
                                      Putting legacy equipment into service and out of landfills.

                                      johnpozJ 1 Reply Last reply Jul 1, 2022, 12:18 AM Reply Quote 0
                                      • johnpozJ
                                        johnpoz LAYER 8 Global Moderator @LPD7
                                        last edited by Jul 1, 2022, 12:18 AM

                                        @lpd7 said in Can't get pfBlockerNG to block pornhub.com:

                                        web sites whose URLs are encrypted (DoT, DoH).

                                        Just to correct a misnomer here - the website is not encrypted via dot or doh, your browser is bypassing your dns and looking up the IP of the website via dns through the dot or doh server.

                                        You can still setup an host alias for pornhub.com so that pfsense looks up that fqdn and blocks the IP it finds. This should be the same no matter where its looked up from. While pfblocker can do that, its also just a simple native host alias in pfsense.

                                        An intelligent man is sometimes forced to be drunk to spend time with his fools
                                        If you get confused: Listen to the Music Play
                                        Please don't Chat/PM me for help, unless mod related
                                        SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                                        L 1 Reply Last reply Jul 1, 2022, 5:12 PM Reply Quote 0
                                        • L
                                          LPD7 @johnpoz
                                          last edited by Jul 1, 2022, 5:12 PM

                                          @johnpoz The browsers are using the PFBox for DNS resolution, I have already confirmed that using nslookup within the PF command line. Why is this topic so confusing to get a straight answer to and why do there seem to be so many supposed ways to accomplish this? Seems to me this is something that is core to the system and not something that should be so obscure to accomplish.

                                          Intelligence is not a substitute for common sense.
                                          Intel i5-3427 * 1.80GHz * 8GB Memory * 100GB HDD
                                          Putting legacy equipment into service and out of landfills.

                                          johnpozJ 1 Reply Last reply Jul 1, 2022, 10:58 PM Reply Quote 0
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.