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

    Forcing Youtube Safe Search

    Scheduled Pinned Locked Moved Cache/Proxy
    2 Posts 2 Posters 1.2k 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
      abasel
      last edited by

      After some googling I came across the following rewrites that I need to do to enforce youtube safe searchs

      YouTube Safety Mode is enforced by rewriting a specific cookie in client request headers, while SafeSearch (for google etc…) is enforced by simply adding a string to the request URL (which is what the edufilter filtering does).

      a quick google of "rewrite youtube header to use safety mode" brings up some info, but most of it is at least a couple years old and I'm not sure how (or if) it could be implemented in pfSense / squidguard.


      Youtube Safe Search

      RewriteCond URL .youtube.com.
      RewriteHeader Cookie: (.*) PREF=f2=8000000

      RewriteRule (.)?youtube.com(.?.*) $1youtube.com$2&safety_mode=true [I,L]

      Like the write in the above, I have no ideas as to how this would look in SquidGuard. Could someone give me a hand? Thanks

      1 Reply Last reply Reply Quote 0
      • S
        sichent Banned
        last edited by

        It is not possible to rewrite the Cookie header in Squid guard. You need to have the content scanning/modification engine. Typically ICAP protocol is used for this purpose like in http://docs.diladele.com/tutorials/filtering_https_traffic_squid_pfsense/index.html

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