SquidGuard force Youtube safe search



  • Hello. I'm brand new to pfsense, having just evaluated Astaro (Sophos UTM 9), untangle and endian as potential means of protecting my home network (and 3 curious boys) from some of the Internet nasties.

    I'm pretty impressed with pfsense so far, but am missing one feature that I really need some help with.

    I need to force the safe search option in Youtube.

    I know that I need to force a line in the cookie that's returned to the browser, and also append an option to the URI, but I'm no regex guru and am not sure how to represent this in the squidguard.inc file where the other rules are.

    From other forums, I can see that the following redirects should achieve the desired results;

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

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

    Would someone kindly assist me in getting this into a format for inclusion in squidguard_adt_safesrch_add function please?


Locked