Navigation

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

    Ideas how to block certain webs (youtube) for kid's PC with possibility to enabling it for some hours.

    Off-Topic & Non-Support Discussion
    3
    10
    850
    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.
    • J
      jimbo12 last edited by

      Hi,
      I have a kids who started to be in the age they can open internet browser and navigate to youtube and then they are stuck in endless loop of that bullsh*t videos there until I force them to turn it off. So I am looking for a way of blocking some webs, now it is youtube with the possibility to add them "enabled time" so they will be for instance able to use the youtube for 1 hour and then block again.

      Before I will start endless googling and inventing possibly already invented wheel, do anybody have some ideas or tips for this?

      Thx!

      noplan 2 Replies Last reply Reply Quote 0
      • noplan
        noplan @jimbo12 last edited by

        @jimbo12

        Pf blocker & DNSBL

        Use the alias generated by pfB in a rule as destination. with the ip of the kids PC (source) and pimp it with a time based scheduler

        Done

        Works here just fine

        J 1 Reply Last reply Reply Quote 0
        • J
          jimbo12 @noplan last edited by

          @noplan

          Well, maybe I will need some more info on this. Currently I use pfblockerng and I have defined some dnsbl feeds for ad blocking and I have added my custom source with entries:

          0.0.0.0 youtube.com
          0.0.0.0 www.youtube.com
          0.0.0.0 m.youtube.com
          

          It works and the PCs can't access youtube. But it blocks youtube for all the clients in my home network and to be honest I do not know how to setup that custom dnsbl list only for certain IP and ideally allow it for some time periods.

          As I am at the beginning of making this solution, I do not want to complicate it but I read it is possible to block some IPs which are associated to youtube (there was some ASN number mentioned). Would not this be an option? I am just asking.

          Thx!

          J 1 Reply Last reply Reply Quote 0
          • J
            jimbo12 @jimbo12 last edited by

            OK, I tried the AS number way. Well, it works when I set the AS numbers related to youtube (and google) in
            pfBlockerNG - > IP -> IPv4:

            2023-02-04_11-06.png

            And it blocks youtube. But unfortunately youtube.com was resolved in my country as 142.251.36.110 which belongs to AS15169 and it includes google services, so for instance even gmail does not work.
            So I think I will have to stick to blocking domain names only and block youtube.com only. I wanted to block youtube's service at all as android youtube apps might use other than youtube.com domain names and youtube videos might work there even if I block youtube.com domain. But interesting - when I blocked m.youtube.com, www.youtube.com and youtube.com via dnsbl, even my android TV did not play youtube, what is good as I will most likely want to block it as well.

            So for me the opened thing is "How to make dnsbl block the youtube domain only for certain IPs?" If somebody gives me a hint it would be great.

            noplan 1 Reply Last reply Reply Quote 0
            • noplan
              noplan @jimbo12 last edited by

              Use DNSBL
              Set it for *YouTube.Com

              Use the alias pfB creates for a rule
              For your hosts

              Go go scheduler set up one

              Go back to the rule advanced and select that scheduler

              Set a second rule without the schedule and pass

              Go to advanced and set allow kill states when schedule expired

              That should do the trick

              Keep me posted

              1 Reply Last reply Reply Quote 0
              • M
                michmoor last edited by michmoor

                I have a vlan on my home network called “KidsZone”. In that vlan is a dns server(Adguard) From there I filter the content I want for the kids. In addition I have time based rules only for that vlan which cuts off the vlan to the internet after 10pm and enable after 7am.
                I also do NAT reflection for dns so any connection to a dns server that isent my Adguard server goes back to Adguard.

                Pfsense can’t so url filtering in the flexible way you may want so it’s easier/cleaner if you put devices you want to control in their own vlan.

                Firewall: NetGate 6100/7100U, Palo Alto
                Routing: Juniper MX204 , Arista 7050X3
                Switching: Juniper EX/QFX. Arista 7050SX
                Wireless: Unifi, Aruba IAP

                noplan 1 Reply Last reply Reply Quote 0
                • noplan
                  noplan @michmoor last edited by

                  @michmoor said in Ideas how to block certain webs (youtube) for kid's PC with possibility to enabling it for some hours.:

                  Pfsense can’t so url filtering in the flexible way you may want so it’s easier/cleaner if you put devices you want to control in their own vlan.

                  i get the approach and yes sounds familiar

                  but can u explain why pfS witch pfB & DNSBL can't realize URL filtering in the flexible way ...
                  I dont get it, maybe im looking at it wrong

                  br NP

                  noplan 1 Reply Last reply Reply Quote 0
                  • noplan
                    noplan @noplan last edited by

                    another way is to use regex
                    as @Gertjan mentioned here

                    link -->

                    https://forum.netgate.com/topic/177672/url-blocking-by-keyword/7

                    1 Reply Last reply Reply Quote 0
                    • noplan
                      noplan @jimbo12 last edited by

                      @jimbo12 said in Ideas how to block certain webs (youtube) for kid's PC with possibility to enabling it for some hours.:

                      o they will be for instance able to use the youtube for 1 hour and then block again.

                      so far you got a pretty solid base on howto block certain things with certain methods usin pfB

                      only missing thing to fulfill your wish is howto time based rules 😵 😵 😵

                      noplan 1 Reply Last reply Reply Quote 0
                      • noplan
                        noplan @noplan last edited by noplan

                        @noplan said in Ideas how to block certain webs (youtube) for kid's PC with possibility to enabling it for some hours.:

                        time based rules

                        4ef62a83-acbd-41c2-a9ca-b04a60e9379e-grafik.png

                        configure your time range and add
                        looks like something like that
                        63cd6497-a933-4056-b845-7c965b2ea1a3-grafik.png

                        save

                        lets go build a firewall rule

                        but 1st set up an alias for all your kids devices if you have em put not togehter in a VLAN

                        90e4be13-0378-4f14-837d-72bd779846d9-grafik.png

                        then
                        7672a23d-3b1e-4284-90bd-0959cea50e21-grafik.png

                        Action= Pass
                        Source = ALIAS of your devices
                        DESTINATION = the pfB Alias pfB created
                        f4d9a175-3d18-4237-9fb2-c14e3f38f53d-grafik.png

                        Fire and forget !

                        could be usefull but think about it carefull
                        6c4c2155-1a73-4208-baf8-e54f29276800-grafik.png

                        if needed or not

                        17de044f-4c94-4be7-97c6-837b34d70a9a-grafik.png

                        **BUT IMPORTANT TO CHECK **

                        666900a9-6ef1-49e8-8f18-36f24d0948f7-grafik.png

                        db4967b4-ad2a-4043-9e5f-d140c4a55c43-grafik.png

                        so that should do teh magic

                        have fun and keep us posted !

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post